On this page
  1. any
  2. Import & Availability
  3. Overview & Signature
  4. Usage
  5. Gotchas
  6. REPL Inspect

any

Prev: anext | Up: __builtins__ | Next: ascii
Rel: all, enumerate, filter, iter, aiter
Ref: docs.python.org — any
Tags: #public #python3 #builtins


Import & Availability

# Built-in (available globally without import)
from builtins import any

Overview & Signature

any(iterable, /)

Return True if bool(x) is True for any x in the iterable.

Usage

assert any(ch.isdigit() for ch in "abc3def") is True
assert any([]) is False

Gotchas

REPL Inspect

help(any)

Linked from

Related notes