Print to a file
1 print 'hello', 'world'
To print to an output file, it's similar
1 f = open('out.txt','w') 2 print >>f, 'hello', 'world'
DZone Snippets > korakot > print
12964 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Korakot Chaovavanich http://korakot.stumbleupon.com
1 print 'hello', 'world'
1 f = open('out.txt','w') 2 print >>f, 'hello', 'world'