def Button(command):
# command() 此种写法错误
return command
b1 = Button(command = lambda : pressNum('7'))
def pressNum(num):
print(type(num),num)
b1()
def Button1(command):
return command
def pressNum1(num): # 此处函数必须写在 b1 = Button1(command=pressNum1('7')) 之前
print(type(num),num)
b1 = Button1(command=pressNum1('7'))
print(b1)