title: while, for loop difference in the following Python codes
body: <p>I'd like to know the difference between the following two codes using while and for loop in each.</p>
  <p>I want to pop elements of the list <code>sandwich_orders</code> into the list of <code>finished_sandwich</code>. it seems to work with while loop but not with for loop. What mistake did I make?</p>
  <pre><code>sandwich_orders = ['chicken sandwich', 'beef sandwich', 'avocado sandwich', 'pork sandwich']
  finished_sandwich = []
  
  while sandwich_orders:
      cur_sandwich = sandwich_orders.pop()
      finished_sandwich.append(cur_sandwich)
  print (finished_sandwich)
  
  for cur_sandwich in sandwich_orders:
      cur_sandwich = sandwich_orders.pop()
      finished_sandwich.append(cur_sandwich)
  print (finished_sandwich)
  </code></pre>