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))
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
0 Comments