なぜこれはファイルに既にあるものを置き換えるのですか?どうすれば取得できますか? (json の代わりに .write .read を使用する必要がありますか?)
def load():
with open("random_number_highscores.txt","r") as x:
print (json.load(x))
def save(a):
with open("random_number_highscores.txt", "w") as x:
json.dump(a, x)
print ("saved.")