Documentation

Function defined in library builtins

any(sequence)

anysequence

Returns True if any element of a sequence is true.

Empty sequences are considered to have no elements true.

sequencesequence of boolean values

True if any element is true, False otherwise
Code
any([True, False, True])
Result
True
Code
any([False, False])
Result
False
Code
any([])
Result
False

See also any in the official documentation

PyTamaro logo

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy Policy • Platform Version c67fb165 (October 16, 2026 at 2:45:13 PM UTC)