A common requirement in Python is to split a string into the characters which make up the string. I’ve previously shown how you can do this by breaking up a …
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’])