xxxxxxxxxx
#Define a command
yummy=0
def all_commands:
print("burgers")
yummy+=1
button = Button(window, text="Hello", command=all_commands)
xxxxxxxxxx
all_commands = lamba: [func1(), func2()]
button = Button(window, text="This is a button", command=all_commands)
xxxxxxxxxx
all_commands = lambda: [func1(), func2()]
button = Button(window, text="This is a button", command=all_commands)
xxxxxxxxxx
pythonCopy def combineFunc(self, *funcs):
def combinedFunc(*args, **kwargs):
for f in funcs:
f(*args, **kwargs)
return combinedFunc