multiple buttons in one line of code in tkinter
问题 I need to create 200 check buttons in Tkinter, as I'm creating a seat selection screen. Is there a way of creating all of these buttons without having to type them out line by line, like you can in pygame? so far I've tried this but it doesn't seem to work. (I am not a super smart coder so it may be a silly mistake). root = tk.Tk() frame1 = tk.Frame(root) frame1.pack(side=tk.TOP, fill=tk.X) button = list() for i in range(4): button.append(tk.Button(frame1, image=karirano, command=partial(klik