Q:

how to find length of list python

# example of len() function

list_number = [6, 3, 8, 0]

length = len(list_number)
print("The lentgh of the list is: " + str(length))
15
studentGrades = [9.1, 8.8, 10.0, 7.7, 6.8, 8.0, 10.0, 8.1, 10.0, 9.9]
print(len(studentGrades))
15
list1 = [1,2,3]
print(len(list))
11
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
10
>>> list = [a, b, c]
>>> len(list)
#output 3
1
my_list = [1,2,3,4,5,6,7,8,9,10]

length_of_list = len(my_list)
3

New to Communities?

Join the community