主な目的: テキスト ファイルからトップ スコアを読み取る関数。関数に渡されるパラメーター: テキスト ドキュメント!
def highscore():
try:
text_file = open ("topscore.txt", "r")
topscore = int(text_file.read())
print topscore
text_file.close()
return topscore
except:
print "Error - no file"
topscore = 0
return topscore
パラメータとしてテキストファイルを追加する方法は?