def nam(name,age):
return str(name)+str(age)
def comb(fun,name,age):
return fun(str(name),str(age)),fun(str(name),str(age))
print(comb(nam,"AHSAN",24))
输出:(“ AHSAN24”,“ AHSAN24”)
def nam(name,age):
print(name+age)
def comb(fun,name,age):
print(fun(name,age),fun(name,age))
print(comb(nam,"AHSAN",str(24)))
输出:AHSAN24 AHSAN24 无无 没有
有人可以向我解释这两个功能之间的区别吗?