
I tried the pop() method with the index of the sandwich in the first loop, but it gave me the same problem. Only every second element gets printed.

I tried the pop() method with the index of the sandwich in the first loop, but it gave me the same problem. Only every second element gets printed.
 
    
     
    
    You're modifying the sandwich_orders list while iterating over it, which is messes up your iteration. Since there aren't any conditions there anyway, I'd finish the iteration and then just assign an empty list to it: sandwich_orders = [], or clear it: sandwich_orders.clear().
Or better yet, since you aren't using this list after the loop is done, just leave it be.
