title: changing the value of var1
body: <p>My question is more of an understanding question than a strict programming question.
  I know that python variables are actually pointers, which means they don't actually store a value, but rather point to the place in memory where that value is stored.
  What i can't figure out is how the following 2 cases differ:</p>
  
  <pre><code>&gt;&gt;&gt; a = 3
  &gt;&gt;&gt; b = a
  &gt;&gt;&gt; a
  3
  &gt;&gt;&gt; b
  3
  &gt;&gt;&gt;b = 4
  &gt;&gt;&gt; b
  4
  &gt;&gt;&gt; a
  3
  </code></pre>
  
  <p>The new value assigned to 'b' does not change the value pointed to by 'a'. As oppose to:</p>
  
  <pre><code>&gt;&gt;&gt; a = [1,2,3]
  &gt;&gt;&gt; b = a
  &gt;&gt;&gt; a
  [1,2,3]
  &gt;&gt;&gt; b
  [1,2,3]
  &gt;&gt;&gt; b.append(4)
  &gt;&gt;&gt; b
  [1,2,3,4]
  &gt;&gt;&gt; a
  [1,2,3,4]
  </code></pre>
  
  <p>The new value assigned to b changed the value pointed to by a</p>