How to get Size of List in Python
![how to get size of list in python](https://pythonpoint.net/wp-content/uploads/2020/12/how-to-get-size-of-list-in-python-1024x576.jpg)
The size of a list can be easily found using the built-in list function len()
.
This function returns the length, i.e, the number of items of an object. The argument passed on to the function can be a sequence such as string, bytes, tuple, list, etc, or a collection such as dictionary, set, etc.
a = ['ab', 'cde', 'fghi'] print("The length of the list is ", len(a))
Output:
The length of the list is 3
Subscribe
Login
Please login to comment
0 Discussion