(Feb-28-2017, 09:38 PM)wavic Wrote: Well, I pop() the current element not the next one.
Note that when you iterate over the list, actually under the hood you iterate over the indexes.
(Feb-28-2017, 09:38 PM)wavic Wrote: Well, I pop() the current element not the next one.
How can run the it step by step and see what is happening?
Look at my code - I expanded the list comprehension for you.
But if you prefer
http://www.pythontutor.com/