title: TypeError: list indices must be integers, not str Python
body: <p><code>list[s]</code> is a string. Why doesn't this work? </p>
  
  <p>The following error appears: </p>
  
  <blockquote>
    <p>TypeError: list indices must be integers, not str </p>
  </blockquote>
  
  <pre><code>list = ['abc', 'def']
  map_list = []
  
  for s in list:
    t = (list[s], 1)
    map_list.append(t)
  </code></pre>