Use float ('inf') or math.inf. (Math.inf is from Python 3.5)
>>> float('inf')
inf
>>> import math
>>> math.inf
inf
>>> float('inf') == math.inf
True
>>> math.inf > 10 ** 10
True
>>> math.inf < 10 ** 10
False
https://docs.python.org/ja/3/library/math.html#math.inf