write(string) : write « File « Python Tutorial






f = open(r'c:\text\somefile.txt', 'w')
f.write('this\nis no\nhaiku')
f.close()








12.16.write
12.16.1.write(string)
12.16.2.Writing to Files
12.16.3.Opening and writing to a file.