0

What is the max value of integer in python for 64-bit system.

I tried sys.maxsize and I tried incrementing the value by 1 and still showing type as int. If it is converted to long data type, why it is not appending L at the end. Also how to find the max value of long type?

sys.maxsize
9223372036854775807
type(sys.maxsize +1)
<class 'int'>
sys.maxsize+1
9223372036854775808
juanpa.arrivillaga
  • 88,713
  • 10
  • 131
  • 172
Alex
  • 111
  • 1
  • 2
  • 11
  • 1
    Python 3 doesn't have `long` data type. The two integer types were unified into `int`, which is essentially equivalent of Python 2 `long`, i.e. an arbitrary-sized integer type. – juanpa.arrivillaga Mar 25 '19 at 03:35

1 Answers1

4

In Python3, value of an integer is not restricted by the number of bits and can expand to the limit of the available memory

print(100**100)

output: 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000