print "Creating a text file with the write() method." text_file = open("write_it.txt", "w") text_file.write("Line 1n") text_file.write("This is line 2n") text_file.write("That makes this line 3n") text_file.close()
Related Scripts with Example Source Code in same category :