math.inf (infinity) constant is a floating point value that represents the mathematical concept of infinity

ExampleEdit & Run
#import the math library
import math

#print the value of infinity
print(math.inf)

#print negative infinity
print(-math.inf)
Output:
inf-inf[Finished in 0.010685866000130773s]
Syntax:
math.inf

The value returned is equivalent to float('inf')

ExampleEdit & Run
import math

print(type(math.inf))

print(math.inf == float("inf"))
print(-math.inf == float("-inf"))
Output:
<class 'float'>TrueTrue[Finished in 0.01020571100525558s]