After how many iterations will an integer circle back to 0 in Python?
Your question is about python, but let me make it more general. Integers are represented in three major ways in modern computers:


Unsigned integers of a fixed number of bits.
Signed integers of a fixed number of bits.
Bignums, also known by various other names such as multiple precision integers.


The first two exhibit the wrap-around behavior. The third doesn't.

Python uses three different representations for integers:


Small integers are stored as "constants".
Integers which fit into a signed machine word (plain integers) are stored as such.
Larger integers (long integers) are stored as bignums.


This is described in the python documentation.

Plain integers are automatically promoted to long integers if need be. Therefore the wrapping around behavior does not happen.

On a 64-bit system, $2^{63}-1$ is the largest plain integer:

&gt;&gt;&gt; (2**62-1)*2+1
9223372036854775807
&gt;&gt;&gt; 2**63
9223372036854775808L


Note the suffix L, which indicates a long integer.