# What is the maximum possible value of an integer in Python ?

## What is the maximum possible value of an integer in Python ?

Consider below Python program.

 `# A Python program to demonstrate that we can store` `# large numbers in Python` `x ``=` `10000000000000000000000000000000000000000000` `x ``=` `x ``+` `1` `print` `(x)`

Output :

`10000000000000000000000000000000000000000001`

In Python, value of an integer is not restricted by the number of bits and can expand to the limit of the available memory (Sources : this and this). Thus we never need any special arrangement for storing large numbers (Imagine doing above arithmetic in C/C++).
As a side note, in Python 3, there is only one type “int” for all type of integers. In Python 2.7. there are two separate types “int” (which is 32 bit) and “long int” that is same as “int” of Python 3.x, i.e., can store arbitrarily large numbers.

 `# A Python program to show that there are two types in` `# Python 2.7 : int and long int` `# And in Python 3 there is only one type : int` `x ``=` `10` `print``(``type``(x))` `x ``=` `10000000000000000000000000000000000000000000` `print``(``type``(x))`

Output in Python 2.7 :

```<type 'int'>
<type 'long'>```

Output in Python 3 :

```<type 'int'>
<type 'int'>```

We may want to try more interesting programs like below :

 `# Printing 100 raise to power 100` `print``(``100``*``*``100``)`

Last Updated on November 13, 2021 by admin

## Socket Programming with Multi-threading in PythonSocket Programming with Multi-threading in Python

Socket Programming with Multi-threading in Python Socket Programming-> It helps us to connect a client

## Python – Remove first element of listPython – Remove first element of list

Python – Remove first element of list Queue data structure is very well known data

## matplotlib.pyplot.imshow() in Pythonmatplotlib.pyplot.imshow() in Python

matplotlib.pyplot.imshow() in Python Matplotlib is a library in Python and it is numerical – mathematical extension

## Making a Pandas DataFrame with two-dimensional listMaking a Pandas DataFrame with two-dimensional list

In this article, we will explore how to create a Pandas DataFrame using a two-dimensional

## Python list pop() MethodPython list pop() Method

Python list | pop() Python list pop() is an inbuilt function in Python that removes and returns

## Python – Split multiple characters from stringPython – Split multiple characters from string

Python | Split multiple characters from string While coding or improvising your programming skill, you

## Pandas DataFrame.ix[ ]Pandas DataFrame.ix[ ]

Pandas DataFrame.ix[ ] Pandas DataFrame.ix[ ] is both Label and Integer based slicing technique. Besides

## Python List sort() methodPython List sort() method

Python List sort() method Python list sort() function can be used to sort a List