Answer the question
In order to leave comments, you need to log in
How to make that from a new line?
mass = [edit1.get() + ' ',edit2.get()+ ' ',edit3.get()]
str1 = open(r'File.txt','a')
str1.writelines(mass)
str1.close()
Answer the question
In order to leave comments, you need to log in
Try like this:
mass = [edit1.get() + ' ',edit2.get()+ ' ',edit3.get()]
str1 = open(r'File.txt','a')
str1.writelines("".join(mass) + "\n")
str1.close()
There is also an option :)
mass = [edit1.get(), edit2.get(), edit3.get()]
# для python 3
print("\n".join(mass),file=open(r'File.txt', 'a'))
# для python 2
print >>open(r'File.txt', 'a'), "\n".join(mass)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question