title: Iterating over list but some values are skipped...?
body: <h2>Iterating a list to delete values less than target</h2>
  
  <p>I am trying to iterate numList and delete all values less than 8 (target). 
  Both 2 &amp; 5 are removed correctly but 3 &amp; 7 are not. </p>
  
  <ul>
  <li>It is definitely the remove method. If numList.remove(n) commented out, the program print statements run correctly.</li>
  </ul>
  
  
  
  <pre><code>numList = [2, 3, 5, 7, 11, 13, 17, 19]
  for n in numList:
      print('Testing: {}'.format(n))
      if n &lt; 8:
          print('-----REMOVING: {}'.format(n))
          numList.remove(n)
  </code></pre>
  
  <p>
  <b>EXPECTED RESULTS:</b>
  <br>Testing: 2
  <br>-----REMOVING: 2
  <br>Testing: 3
  <br>-----REMOVING: 3
  <br>Testing: 5
  <br>-----REMOVING: 5
  <br>Testing: 7
  <br>-----REMOVING: 7
  <br>Testing: 11
  <br>Testing: 13
  <br>Testing: 17
  <br>Testing: 19
  <br>Expecting: [11, 13, 17, 19]</p>
  
  <p>
  <br><b>ACTUAL RESULTS</b>
  <br>Testing: 2
  <br>-----REMOVING: 2
  <br>Testing: 5
  <br>-----REMOVING: 5
  <br>Testing: 11
  <br>Testing: 13
  <br>Testing: 17
  <br>Testing: 19
  <br>Actual: [3, 7, 11, 13, 17, 19]</p>