ID EN
Built-in Functions

len

Python 3.11

Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).

Syntax

PYTHON
len(s)

See Also

OverflowError sys.maxsize range(2 ** 100)