I am looking for minimum and maximum values for integers in python. For eg., in Java, we have
In Python 2, there's
>>> sys.maxint 9223372036854775807
And you can calculate the minimum value with
-sys.maxint - 1 as seen here. Of course Python just switches from plain to long integers once you exceed this value.
In Python 3 this value has no significance at all for integers. (However, a closely related value is still available as
sys.maxsize, in case you're actually looking for the machine's word size.)