Skip to Content

In Python the len() function is built-in and doesn’t require any import statements to use.

The len() function accepts one parameter which can be an array of different data types from lists, to dictionaries, tuples and strings.

To use the function simply use as follows (example below is performed in the Python REPL):
>>> len([‘a’, ‘b’, ‘c’])