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"])
  1. print(len(t1))
  2. print(len[t1])
  3. 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

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.