The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #349
for loops can have an else clause. The else clause executes after the loop completes normally.
(book.pythontips.com/en/latest/for_-_else.html)
for item in container: if search_something(item): # Found it! process(item) break else: # Didn't find anything.. not_found_in_container()
Question difficulty: 🔵🔵🔵🔵🔵