Print To A File
Join the DZone community and get the full member experience.Join For Free
To print to console, it's easy
print 'hello', 'world'To print to an output file, it's similar
f = open('out.txt','w') print >>f, 'hello', 'world'
Opinions expressed by DZone contributors are their own.