当前位置: 首页 > 图灵资讯 > 行业资讯> python 正无穷怎么表达

python 正无穷怎么表达

发布时间:2025-01-02 17:34:05

【相关学习推荐:python教程】

python 表达正无穷的方法:

python中并没有特殊的语法来表示这些值,但是可以通过 float() 来创建它们:

正无穷:

a=float('inf')

负无穷:

b=float('-inf')

a530f2efce6a2496fa0eda56e6e2924.png

相关文章

python3兼容python2吗

python3兼容python2吗

2025-05-09
python3 whl怎么安装

python3 whl怎么安装

2025-05-09
python 字典怎么提取value

python 字典怎么提取value

2025-05-09
python 怎样计算字符串的长度

python 怎样计算字符串的长度

2025-05-09
python 怎么样反向输出字符串

python 怎么样反向输出字符串

2025-05-09
python 怎么判断字符串开头

python 怎么判断字符串开头

2025-05-09