Return True if at least one item in iterable is truthy; stop at the first truthy item. Return False when iterable is empty or every item is falsy.
Syntax
any(iterable, /)Parameters
Returns
Boolean — True when any item is truthy; False otherwise.Example
scores = [0.42, 0.91, 0.65]
has_match = any(score >= 0.85 for score in scores)
if has_match:
text("found")