math.inf
(infinity) constant is a floating point value that represents the mathematical concept of infinity
#import the math library
import math
#print the value of infinity
print(math.inf)
#print negative infinity
print(-math.inf)
math.inf
The value returned is equivalent to float('inf')
import math
print(type(math.inf))
print(math.inf == float("inf"))
print(-math.inf == float("-inf"))