Tuesday, February 4, 2014

Write To A File Simple Way

#!/usr/bin/python 
# Open a file 
fo = open("foo.txt", "w")
fo.write( "Python is a great language.\nYeah its great!!\n");
 # Close opend file 
fo.close()




No comments:

Post a Comment