heres the code
doc = open(path, 'w+')
lines = []
i = 0
for line in doc:
lines.append(line)
i += 1
if i == 1:
money = int(line)
print(lines)
heres what is returns
[]
the text file contains one line that says "1000"
I tried to resolve the issue by opening it with r, close it, and open it again with w. But for some reason it just deletes all of the text in the file when I try to write anything.