title: For x in list and list.insert causes endless loop
body: <p>I have no idea if this is a bug or not, but why does this cause an endless loop?</p>
  
  <pre><code>&gt;&gt;&gt; top_ports = [[1], [0.9], [0.8], [0.7], [0.6]]
  &gt;&gt;&gt; a = 2
  &gt;&gt;&gt; for x in top_ports:
  ...     if a &gt; x[0]:
  ...             top_ports.insert(0,a)
  ... 
  </code></pre>