[Solved] what is meaning of string inside array python


When you use x[y] = z, it calls the __setitem__ method.

i.e.

x.__setitem__(y, z)

In your case, CmdBtn['menu'] = CmdBtn.menu means

CmdBtn.__setitem__('menu', CmdBtn.menu)

The Menubutton class does indeed provide a __setitem__ method. It looks like this is used to set a “resource value” (in this case CmdBtn.menu) for the given key ('menu').

solved what is meaning of string inside array python