【发布时间】:2020-03-06 12:32:26
【问题描述】:
我知道我可以使用 num ** pow 作为替代方案,但只是为了将来我想了解为什么以下代码不起作用:
def math(num, pow):
return pow(int(num), int(pow))
# the return keyword returns the result
pass
print(math(2, 4))
【问题讨论】:
-
为什么你的变量和内置函数一样命名?
-
你写的“不工作”到底是什么意思?
标签: python python-3.x math pow