import json def save(jsettings,jhisory): with open("saves/settings.json", "w") as data: data.write(json.dumps(jsettings,indent=4)) with open("saves/history.json", "w") as data: data.write(json.dumps(jhisory,indent=4)) def load(self) -> list: with open("saves/settings.json", "r") as data: jsettings = json.load(data) with open("saves/history.json", "r") as data: jhistory = json.load(data) return jsettings,jhistory