print("YOUR_SCORE=> " ,P1.score) d = shelve.open(\'score.txt\') # here you will save the score variable HighscoreStored = d[\'score\']