title: Changing a list item without changing original values
body: <p>I'm doing some practice problems and one program is asking me to change numbers in the list to 99, only if the number previously is even. I'm running into the trouble that when I change the number to 99, when it moves on the the next number, it checks to see if 99 is even, which I don't want, I want it to check the original value I had there, not what I changed it to .</p>
  
  <pre><code>d = [9, 8, 2, 15, 6, 33, 10, 4]
  i = 1
  while i &lt; len(d) - 1 :
      if d[i-1]%2 == 0 :
          d[i] = 99
      i = i + 1
  
  print d
  </code></pre>
  
  <p>returns <code>[9, 8, 99, 15, 6, 99, 10, 4]</code></p>
  
  <p>I want it to return <code>[9,8,99,99,6,99,10,99]</code></p>
  
  <p>How would I add 99 into the original list without changing its original value if that makes any sense? List methods like pop or insert can not be used.</p>