Languages

What is the maximum possible integer number in Python ?

9 points
Asked by:
Meredith-Soto
325

I have noticed, when I sum two numbers they give result that is bigger than max unsigned int 64 value.

Does Python has some limits for the numbers?

1 answer
7 points
Answered by:
Root-ssh
178260

In Python 3, maximal integer number value is limited only by available memory.

Example program:

Output:

Hint: Python 2 used int and long types, where int used 32 bits and long was limited by available memory.

References

  1. Numeric types (int, float, complex) - Homepage
0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join