Q:

python find the number of elements in a list

#	How to use the len function:

list = ["Elefant", "Snake", "Penguin"]

print(len(list))

#	Explanation:
#	>print(len(list))<
#	With the 'len' function Python counts the amount of elements in a list (The length of the list).
#	In this case the output is '3' because there are 3 elements in the list.
3
list1 = [2,3,4,3,10,3,5,6,3]
elm_count = list1.count(3)
print('The count of element: 3 is ', elm_count)
0

New to Communities?

Join the community