Contact: aviboots(AT)netvision.net.il
43,693 questions
57,001 answers
573 users
txtfile = open("d:\\test.txt", "w") txtfile.write("python programming\n") txtfile.write("text file\n") txtfile.close() ''' run: test.txt -------- python programming text file '''
with open('info.txt', 'w') as txtfile: txtfile.write("python" + "\n") txtfile.write("c" + "\n") txtfile.write("c++" + "\n") ''' run: python\ c c++ '''