1List = ["Elephant", "Snake", "Penguin"]
2
3print(len(List))
4
5# With the 'len' function Python counts the amount of elements
6# in a list (The length of the list).
7# In this case the output is '3' because there are 3 elements in the list.
1list_a = ["Hello", 2, 15, "World", 34] #just the array
2
3number_of_elements = len(list_a)
4
5print("Number of elements in the list: ", number_of_elements)
6
1List = ["Elephant", "Snake", "Penguin"]
2
3print(len(List))
4
5# With the 'len' function Python counts the amount of elements
6# in a list (The length of the list).