Over a million developers have joined DZone.

Print To A File

·
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'
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}