Python ProgrammingPython Programming

How to get the length of list in python?

You can use len() method, to get total number of items in a list.

Print the count of items in the list:

testList = ["Canada", "Japan", "London", "Germany", "Africa"]
print(len(testList))
Output
5