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 >>
In Python 3 it is a function, but in Python 2 you can add this to the top of the source file:
from __future__ import print_function
Then you do
print("hi there", file=f)