How to read txt files

Hello, i do not know how to read text files. I do know how to write them. i stored these 5 variables in a txt file, all of them being in seperate lines. How do i convert the txt file back into variables?

This is the text file “SaveFile.txt“

any help is appreciated!

-Quinn Jusufi <3

1 Like

Most of the info about reading a file can be found here:

You could use the get_line() function if you want to read the file line by line. But depending on what you’re trying to achieve, it might be better to use formats other than just a plain text file.
Namely, you should look into ConfigFile if you want to store specific variables for things like options / settings, OR convert a collection / dictionary into a JSON file.