File Python Tutorial

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