Published in


any() function in Python

A way to test conditions.

This function takes an iterable object as a parameter and returns a Boolean value (True or False).
It works similarly to the OR operator.

Here are the possible return results:
All elements False = False
All elements True = True
Only one element False = True
Only one element True = True
Empty list = False



Let’s make better decisions. Data driven decisions. I use Python, R, Excel and SQL to create Data Science projects.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gustavo Santos

Data Scientist. I extract insights from data to help people and companies to make better and data driven decisions. | In: