Low Orbit Flux Logo 2 F

Python Max Int

In Python 3 the int type is unbounded. You might actually just be limited by the word size of the interpreter. This is usually going to be dependent on the physical machine that it is running on. The maximum representable value will generally be sys.maxsize * 2 + 1.

In Python 2 the max value for an int can be found in sys.maxint. It works out to be 9223372036854775807. You can check and output it like this:


print(sys.maxint)