title: Python- When I move items in one list to anther list, some items are missing
body: <p>When I move items from list &quot;X&quot; to anther list &quot;A&quot;, but some items are missing.</p>
  <p>Here is my code.</p>
  <pre><code>X=list(range(2,11))
  print(X)
  A=list()
  for x in X:
         A.append(x)
         X.remove(x)
         print(&quot;A is &quot;, A)
         print(&quot;X is &quot;, X)
  </code></pre>
  <p>I expected <code>X =[], A =[2,3,4,5,6,7,8,9,10],</code></p>
  <p>but the result was</p>
  <pre><code>A is  [2, 4, 6, 8, 10]
  X is  [3, 5, 7, 9]
  </code></pre>
  <p>the odd numbers aren't moved.
  I want to know why they are not moved and how to move them.</p>
  <p>I'm new to python programing, and any help will be greatly appreciated.</p>