Mega Code Archive

 
Categories / Python / File
 

File write(string)

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