I have recently made a game with python that makes the user decipher an anagram and based on difficulty it increases their score. Is there any way to implement a high score into this without the use of a text file?
The overall goal is for the program to compare the users score to the high score and if the score is greater it would edit the high score to the score gained. This would need to stay like that for the next run through of the program after I close it.
At the end of the day, you need to store the score in one type of database or the other, whether it's a file-based database or relational or any other. For one execution of your code, you can certainly keep it in the RAM, but for persistence, there's no way around it. If your use case is simple, you may consider sqlite instead of explicit file-based storage.
Python: is it possible to set a high score without a text file?