You can use the len() function to any iterable objects. It returns an integer which is the length of that iterable object.

Python len Example

Python len() is an inbuilt function that returns the length of any iterable objects. It returns the no. of characters of String; it returns the total number of items of list or dictionary.

The syntax of the Python len function is the following.

len(any iterable object)

An only required argument is an iterable object which can be a list, string or dictionary.

#python #len() function #python len

Python built-in len() Function Example
1.30 GEEK