text_file = open("high_score.txt", "w")
text_file.writelines([player_name, "'s score is: ", scores])
text_file.close()
text_file = open("high_score.txt", "r")
print(text_file.read())
text_file.close()
I am attempting to write high scores to a .txt file. But each time it re-writes the file.
How do I keep this from happening?