Home »
Python »
Python List MCQs
What will be the syntax to use the Len function to get the size of the following list?
19. What will be the syntax to use the Len function to get the size of the following list
l1=[["hello",1,2,3], ["Hi"," everyone"," How"," Are"," You"]]?
- Print(len(l1)
- Print (len[l1])
- Print ([ len (l1)])
Answer: A) Print(len(l1)
Explanation:
To get the size of any list we will use the following syntax: - Print(len(l1), where l1 is the name of the list.