abs() 函数 返回数字的绝对值 语法 abs(x) 作用 返回x数字的绝对值. 实例 1 print(abs(-1)) # 1 2 print(abs(-45)) # 45 转载于:https://www.cnblogs.com/zxq520921/p/9471774.html