title: Modification of the list items in the loop (python)
body: <p>I'm trying to modify items in a list using a for loop, but I get an error (see below). Sample code:</p>
  
  <pre><code>#!/usr/bin/env python
  # *-* coding: utf8 *-*
  
  data = []
  data.append("some")
  data.append("example")
  data.append("data")
  data.append("here")
  
  for item in data:
      data[item] = "everything"
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./testy.py", line 11, in &lt;module&gt;
      data[item] = "everything"
  TypeError: list indices must be integers, not str
  </code></pre>
  
  <p>Is there any way to solve this problem?</p>