Looking for an explanation on the results of identity testing on integer variables in Python : <p>I have a simple code I stumbled upon on HyperSkill and was testing it on the Python console, both Python2 and Python3. The results confused me. </p>

<pre><code>&gt;&gt;&gt; a = 5
&gt;&gt;&gt; b = 5
&gt;&gt;&gt; a == b
True
&gt;&gt;&gt; a is b
True
&gt;&gt;&gt; x = 1000
&gt;&gt;&gt; y = 1000
&gt;&gt;&gt; x == y
True
&gt;&gt;&gt; x is y
False
&gt;&gt;&gt;
</code></pre>

<p>I don't understand why the result of <code>a is b</code> is <code>True</code> and yet the result of <code>x is y</code> is (as expected) <code>False</code></p>
