title: how does the method .remove make difference in python?
body: <pre class="lang-py prettyprint-override"><code>a = [(1, 1), (35, 1), (1, 35), (35,35)]
  
  for i in a:
      print(i)
  </code></pre>
  <p>then it prints</p>
  <blockquote>
  <p>(1, 1)<br />
  (35, 1)<br />
  (1, 35)<br />
  (35, 35)</p>
  </blockquote>
  <p>however this code , though I expected the same result</p>
  <pre class="lang-py prettyprint-override"><code>a = [(1, 1), (35, 1), (1, 35), (35,35)]
  
  for i in a:
     a.remove(i)
     print(i)
  </code></pre>
  <p>then the result is</p>
  <blockquote>
  <p>(1, 1)<br />
  (1, 35)</p>
  </blockquote>
  <p>How can the method <code>.remove</code> make this difference? I have no idea how it works. Please help me!</p>