print number of items in list python code example
Example 1: python find the number of elements in a list
list1 = [2,3,4,3,10,3,5,6,3]
elm_count = list1.count(3)
print('The count of element: 3 is ', elm_count)
Example 2: python how to count all elements in a list
List = ["Elephant", "Snake", "Penguin"]
print(len(List))
Example 3: number of elements in list in python
listOfElems = ['Hello', 'Ok', 'is', 'Ok', 'test', 'this', 'is', 'a', 'test']
len(s)
Example 4: python number of elements in a list
list_a = ["Hello", 2, 15, "World", 34]
number_of_elements = len(list_a)
print("Number of elements in the list: ", number_of_elements)