# How can I represent an infinite number in Python?

In Python, you can do:

`test = float("inf")`

In Python 3.5, you can do:

`import mathtest = math.inf`

And then:

`test > 1test > 10000test > x`

Will always be true. Unless of course, as pointed out, x is also infinity or "nan" ("not a number").

Additionally (Python 2.x ONLY), in a comparison to `Ellipsis`

, `float(inf)`

is lesser, e.g:

`float('inf') < Ellipsis`

would return true.