After how many iterations will an integer circle back to 0 in Python? If this question is completely garbage I apologize because I am new to CS and haven't understood at how programming languages (Python specifically) work.

I was reading about how in a standard two-byte representation of a number, if one was to increment 65,536 times, the integer would wrap back to one. Would this case occur in Python, and if so at what number would this occur? 

Edit: I read a little bit further into this and it seems that after an increment, programming languages seem to redefine the value. Would this prevent this from occur
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.