先改模块math,然后用pow函数,示例如下:
假设要求2的3次幂的结果
 

import math
math.pow(2,3)

更多推荐

python编程里的幂怎么表示