from re import findall
output = 0
f = open("100$ School.txt", "w+")
f.write(str(output))
My goal is to have it so every time it runs it writes it in a new line. Thank you to anyone who takes to the time to awnser
from re import findall
output = 0
f = open("100$ School.txt", "w+")
f.write(str(output))
My goal is to have it so every time it runs it writes it in a new line. Thank you to anyone who takes to the time to awnser
You need to append for it to not overwrite. so w+ needs to be a+
from re import findall
output = 0
f = open("100$ School.txt", "a+")
f.write(str(output)+"\n")
Try this one:
f = open("100$ School.txt", "a+") # "a+" for append
f.write(f"{output}\n")