- Learn Python by Building Data Science Applications
- Philipp Kats David Katz
- 40字
- 2021-06-24 13:06:09
The all and any functions
all and any are self-explanatory as well. Simply put, they are extended and and or operators, and work with multiple values at once:
all([False, True, True])
>>> False
any([False, True, False])
>>> True