ID EN
Operators

length_hint

Python 3.11

Return an estimated length for the object obj. First try to return its actual length, then an estimate using object.__length_hint__(), and finally return the default value.

Syntax

PYTHON
operator.length_hint(obj, default=0)

See Also

object.__length_hint__()