title: Python :for loop list not counting space and " ,"
body: <p>I have written this code</p>
  
  <pre><code>phrase="dont't panic"
  plist=list(phrase)
  print(plist)
  l=len(plist)
  print (l)
  for i in range(0,9):
      plist.remove(plist[i])
  print(plist)
  </code></pre>
  
  <p>The output is</p>
  
  <p><code>['d', 'o', 'n', 't', "'", 't', ' ', 'p', 'a', 'n', 'i', 'c']</code></p>
  
  <p><code>12</code></p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/hp/Desktop/python/panic.py", line 7, in &lt;module&gt;
      plist.remove(plist[i])
  IndexError: list index out of range
  </code></pre>
  
  <p>why does it show:<code>list index out of range</code> when the length of the list is 12? </p>