函数声明:
pow(base, exp[, mod])
计算 base 的 exp 次幂,并返回计算结果。如果 mod 存在,则返回 base 的 exp 次幂对 mod 取余。
案例代码:
>>> pow(2,3) 8 >>> x = 3 >>> pow(x,3) 27 >>>
函数声明:
pow(base, exp[, mod])
计算 base 的 exp 次幂,并返回计算结果。如果 mod 存在,则返回 base 的 exp 次幂对 mod 取余。
案例代码:
>>> pow(2,3) 8 >>> x = 3 >>> pow(x,3) 27 >>>