I\'m used to doing print >>f, \"hi there\"
print >>f, \"hi there\"
However, it seems that print >> is getting deprecated. What is the recommended way t
print >>
You can also try filewriter
filewriter
pip install filewriter
from filewriter import Writer Writer(filename='my_file', ext='txt') << ["row 1 hi there", "row 2"]
Writes into my_file.txt
my_file.txt
Takes an iterable or an object with __str__ support.
__str__