python的平方运算符是“**”,那么python中x的平方,就是这么写:x**2。
**:幂 - 返回x的y次幂。
示例:
a = 3 b = 2 c = a**b print(c)
输出结果如下:
9
更多Python知识请关注栏目。