print to a file : Text file : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Text file »

 

print to a file


log = open('log.txt', 'w')
print >> log, 123
print >> log, 456
log.close(  )
print 789
print open('log.txt').read(  )



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo File
» Text file