title: Operating on one list also changes the other
body: <p>I solved Project Euler's Problem 67 a few months back with a wildly inefficient algorithm. Today, I realized how this could have been done better, and while trying to make a more efficient algorithm, I ran into some problems. </p>
  
  <p>The code is this:</p>
  
  <pre><code>r_prev = [59,0,0]
  r_load = [73,41,0]
  r = [0,0,0]
  zero_r = [0,0,0]
  rows = 3
  while rows != 0:
      position = 0
      for x in r_load:
          try:
              if r_prev[position] &gt; r_prev[position-1]:
                  r[position] = r_prev[position] + r_load[position]
              else:
                  r[position] = r_prev[position-1] + r_load[position]
          except IndexError:
              r[position] = r_prev[position] + r_load[position]
          position += 1
      print r
      rows -= 1
      r_load = input("Enter next row")
      r_prev = r
      r_prev.append(0)
      zero_r.append(0)
      r = zero_r
  </code></pre>
  
  <p>It works by keeping only the sum of the highest path to get to a point. I am feeding it input manually at this point (via the console). When fed the first line, it performs as expect, but when fed the second line, it considers <code>r_prev</code> and <code>r</code> as the same thing, and every operation that is performed on <code>r_prev</code> is also performed on <code>r</code>.</p>
  
  <p>How do I solve this problem?</p>