title: How does memory location changes by modifying an immutable object in python?
body: <p>We can check if the object type is mutable or not by comparing the new memory location of modified variable with the originally defined variable.</p>
  <p>For example - <strong>int()</strong> is an immutable object in Python. If I try to modify the value of integer type variable, I notice the memory location changes <strong>[Code and Output below]</strong>. Can someone provide a brief explanation going in the background ?</p>
  <pre><code>#initial variable
  a = 10
  # initial memory location
  print(id(a))
  #modified variable
  a += 1
  # new memory location, is it same?
  print(id(a))
  </code></pre>
  <blockquote>
  <pre><code>OUTPUT
  
  93285870446416
  93285870446524
  </code></pre>
  </blockquote>