title: python assign values to list elements in loop
body: <p>Is this a valid python behavior? I would think that the end result should be [0,0,0] and the id() function should return identical values each iteration. How to make it pythonic, and not use enumerate or range(len(bar))?</p>
  
  <pre><code>bar = [1,2,3]
  print bar
  for foo in bar:
      print id (foo)
      foo=0
      print id(foo)
  print bar
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>[1, 2, 3]
  5169664
  5169676
  5169652
  5169676
  5169640
  5169676
  [1, 2, 3]
  </code></pre>