Q:

list size 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
my_list = ['20', '40', '60']
len(my_list) # 3
4
list1 = [1,2,3]
print(len(list))
11
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
10
my_list = [1,2,3,4,5,6,7,8,9,10]

length_of_list = len(my_list)
3
li = [None] * 5 # [None, None, None, None, None]
li = [0] * 5 # [0, 0, 0, 0, 0]
3

New to Communities?

Join the community