python内置函数之一:abs()

abs(x)

Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned.

描述:

返回数字的绝对值,参数可以是整数或浮点数。如果参数是复数,则返回其大小。

猜你喜欢

转载自blog.csdn.net/weixin_41931548/article/details/89202773
今日推荐