length of list in python

36

len([x for x in range(10)])
10
len([1,2,3,[1,2,3]])
4
list = ['a','b','c'] 

len(list)
alphabet=['a','b','c','d','e'] 
# length of list or size of a list
print('length of list:',len(alphabet))

Comments

Submit
0 Comments