Save changed textbutton state back to dictionary value list index 0
问题 Good Day. I have managed to load a dictionary from a text file with this code: def loadDictFile(data_folder): critDict = json.loads(open(data_folder+'critDict3.txt').read()) print('json_data is', critDict) return critDict And I can create a tkinter UI with checkboxes that are on or off according to the dictionary values using the following code: def makeUI(data_folder, critDict): top = Tk() varList=[] for key, val in critDict.items(): myVar = IntVar()#create intVar for this checkbutton