What's the difference between using File.write() and print>>File,?
Which is the pythonic way to write to file?
>>> with open('out.txt','w') as fout:
...     fout.write('foo bar')
... 
>>> with open('out.txt', 'w') as fout:
...     print>>fout, 'foo bar'
... 
Is there an advantage when using print>>File, ?
 
     
     
    