Apr-12-2020, 07:36 AM
Hi guys!
I'm an absolute newbie in python.
I have this problem with tk inter:
I'm an absolute newbie in python.
I have this problem with tk inter:
class months(): def __init__ (self,name,days_of_the_month,year): mesi.name = nome mesi.days = days_of_the_month mesi.year = year january= months('January',31,2020) february= months('February',29,2020) . . . december= months('December',31,2020) months_list = [january,february,........,december] for i in range(len(months_list)): new_LabelFrame = LabelFrame(root,text= months_list[i].name) new_LabelFrame.pack() new_label = Label(new_LabelFrame,text ='Name: {}\nDays: {}\nYear: {}'.format(months_list[i].name,months_list[i].days,months_list[i].year)) new_label.pack()When i run the code, it geerates a windows with 12 LabelFrame containing only the December's month information. Could you please tell me why?