Write a program to declare a list and calculate it's length

Write a program to declare a list and calculate it's length

len() function is used to calculate the length of the list. Below is the program which explains the same.

list = [1,2,3,4,5,6,34,54,21,78]
print(len(list))

In the above program list is declared and length of the list is calculated using the len() function and then printed to output using the print() fucntion

Post a Comment

0 Comments