Home »
Python »
Python Tuples MCQs
What will be the syntax to use the Len function to get the size of the following tuple?
28. What will be the syntax to use the Len function to get the size of the following tuple?
t1=(["hello",1,2,3], ["Hi"," everyone"," How"," Are"," You"])
- print(len(t1))
- print(len[t1])
- print([len(t1)])
Answer: A) print(len(t1))
Explanation:
To get the size of any tuple we will use the following syntax: - print(len(t1)), where t1 is the name of the tuple.
Example
t1 = (["hello", 1, 2, 3], ["Hi", " everyone", " How", " Are", " You"])
print(len(t1))
Output
2