我习惯了 print >>f, "hi there"
print >>f, "hi there"
但是,它似乎print >>已被弃用.建议的方法是什么?
print >>
更新:关于所有这些答案"\n"......是通用的还是特定于Unix的?IE,我应该"\r\n"在Windows 上做什么?
"\n"
"\r\n"
python file-io
file-io ×1
python ×1