While Loops and Lists

In this lesson you’ll learn how to iterate over a list using a while-loop. The code is debugged in a live session in the video. A simple example may look like this:

a = ["fizz", "baz", "buzz"]
while a:
    print(a.pop(-1))

Comments & Discussion

Become a Member to join the conversation.