11
Question Question 11
What will be the output of the following Python code?
tp = (5,)
tp1 = tp * 2
print(len(tp1)) - 0
- 2
- 1
- Error
2
Reason — The "*" operator performs repetition in tuples. tp1 = tp * 2 will result in tp1 as (5, 5) so its length will be 2.