How do I write a line to a file in modern Python? I heard that this is deprecated:
print >>f, "hi there"
Also, does "\n"
work on all platforms, or should I use "\r\n"
on Windows?
How do I write a line to a file in modern Python? I heard that this is deprecated:
print >>f, "hi there"
Also, does "\n"
work on all platforms, or should I use "\r\n"
on Windows?