how to use loop to reduce the the code in python
问题 I would like to create a lot of widgets in tkinter. I am currently using a lot of code for this. Is there a way to summarise the code? However, I would still like to be able to capture the value of each widgets. The numbering goes up to 200... Thanks a lot! ''' self.A1_rubbing_marks_Type = tk.StringVar(self.A_Frame_measure) # Dictionary with options self.A1_choice_rubbing_marks= ['No', 'Yes'] self.A1_rubbing_marks_Type.set('') # set the default option self.A1_Menu_rubbing_marks = tk