title: Why stop the loop after remove an element?
body: <p>I've the following code snippet. Why do the loop not remove all points from list <code>points</code>, I'm very confused about that. I mean, all points are in the triangle.</p>
  
  <pre><code>print "check whether",points,"are in triangle"
  print "p=",points[0]," is in triangle=",isPointInTri(a,b,c,points[0])
  print "p=",points[1]," is in triangle=",isPointInTri(a,b,c,points[1])
  
  for p in points:
      if isPointInTri(a,b,c,p):
          points.remove(p)
      print "now, the following points are available", points
  print points
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>check whether [(2, 1), (4, 1)] are in triangle
  p= (2, 1)  is in triangle= True
  p= (4, 1)  is in triangle= True
  now, the following points are available [(4, 1)]
  [(4, 1)]
  </code></pre>
  
  <p>Has anyone an idea?</p>