def load():
with open("random_number_highscores.txt","r") as x:
print ("HIGHSCORES")
print ("Least guesses made.")
print (json.load(x))
time.sleep(1)
def save(a):
with open("random_number_highscores.txt", "a") as x:
json.dump(a, x)
print ("saved.")
time.sleep(1)
왜 def로드가 작동하지 않습니다. 필자 (STR의 (a), 배)하지만, 작업 중 하나를 당신이 가 저장 파일에를 추가하는로드시 파일 IO 오류
나중에 참조 할 수 있도록 실제 오류가 있습니다. 나는이 경우 교양있는 추측을했지만 추적 메시지를 포함한 오류 메시지는 문제를 진단하는 데 매우 중요합니다. –
왜 투표가 늦습니까? – StandingBird