Ask coding questions

← Back to all posts
After refreshing page all the contents in the .txt file created are lost!
JoshuaBarr (0)

I have a code written in python that works pretty good and does as it should by writing contents of a list to a .txt file. After the program halts its still in the .txt file but if i refresh the page all the info in that .txt file is lost. Does allow for saving info in those .txt files for later use?

AllAwesome497 (103) currently won't work with storing data in files via the program. Consider or as external databases

SPQR (407)

Repl does, but it's a bit finnicky sometimes (I have a level-saving feature in my game but sometimes I can't see the files in the IDE, but the program can still access them.)

Try accessing the file from the program or from the shell. Contents should still be there after the program runs.