AttributeError: 'str' object has no attribute 'disable'
问题 I am currently learning guizero and I ran into an issue fairly quickly with making a function that disables buttons when clicked. The entire code is a bit much so below is the code that's applicable to the situation. buttons = ["button0", "button1"] def disable(n): buttons[n].disable() menu = Box(app, layout="grid", grid=[1,0]) button0 = PushButton(menu, command=lambda: disable(0), text="x", grid=[0,0]) button1 = PushButton(menu, command=lambda: disable(1), text="x", grid=[1,0]) Unfortunately