How to Use Pass Statement in For Loop in Python


In this example, we will learn how to use the pass statement in the for loop in Python.

Source Code

# If the for loop is empty and has no pass statement, an error is thrown
for i in [0, 2, 10]:
    pass
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Advertisement