You’ve learned the ins and outs of using any() in Python and the differences between any() and or. You’ve also explored short-circuiting and using list comprehensions with any(). With a deeper understanding of these two tools, you’re well prepared to decide between them in your own code.
In this course, you learned how to:
- Use
any()andnot any() - Elimate long
orchains - Use
any()with list comprehensions - Evalute values that aren’t explicitly
TrueorFalse - Distinguish between
any()andor - Use short-circuiting
For more information on concepts covered in this course, you can check out:

deepakpatrick on Feb. 27, 2022
The last print output seems counter intuitive