【相关学习推荐:python教程】 python 表达正无穷的方法: python中并没有特殊的语法来表示这些值,但是可以通过 float() 来创建它们: 正无穷: a = float('inf') 负无穷: b = float('-inf')