What does the any() function return?

Python Developer Medium

Python Developer — Medium

What does the any() function return?

Key points

  • any() returns True if at least one element is truthy
  • Returns False if all elements are falsy or if the iterable is empty
  • It does not return the first truthy element or a list of truthy elements

Ready to go further?

Related questions