0

https://pastebin.com/iuw39F3x

This is what I'm working with. On line 43 you can see I'm writing a string to a text file. Once the script looks again I want it to write another string to the text file on another line. How would I do this?

Misha Eide
  • 47
  • 1
  • 5

1 Answers1

0

You open the file, add the text and add the new line char...

Finally close the file too (you don't want to try to open a file that is already open :) )

x = open("myfile.txt","a")
x.write("the line here" + '\n')
x.close() 

In your case

file = open("text.txt","a")
file.write(save + '\n')    #here add the new line
file.close()
time.sleep(25)
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97