->

Real Python - Python any(): Powered Up Boolean Function

Real Python - Python any(): Powered Up Boolean Function

https://realpython.com/courses/python-any-boolean-function

 

As a Python programmer, you’ll frequently deal with Booleans and conditional statements—sometimes very complex ones. In those situations, you may need to rely on tools that can simplify logic and consolidate information. Fortunately, any() in Python is such a tool. It looks through the elements in an iterable and returns a single value indicating whether any element is true in a Boolean context, or truthy.


 

 

In this course, you’ll learn how to

 

Use any() and not any()

Elimate long or chains

Use any() with list comprehensions

Evalute values that aren’t explicitly True or False

Distinguish between any() and or

Use short-circuiting

 

Real Python - Python any(): Powered Up Boolean Function


 TO MAC USERS: If RAR password doesn't work, use this archive program: 

RAR Expander 0.8.5 Beta 4  and extract password protected files without error.


 TO WIN USERS: If RAR password doesn't work, use this archive program: 

Latest Winrar  and extract password protected files without error.


 Solid   |  

Information
Members of Guests cannot leave comments.




rss