← Python Intermediate
10 / 25
Lesson 10 — any and all
Quick checks
any is True if at least one item is truthy; all if every item is. Both accept a generator like (n > 0 for n in nums).
Why it matters: they replace long loops for validation.
Want it another way?
Task
Print True if all numbers are positive.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
Test your knowledge
A quick 3-question quiz on this lesson — instant feedback.