Home »
Python »
Python Tuples MCQs
What will be the output of the following code? | Tuples Que. 30
30. What will be the output of the following code?
t1=([22,1,2,3],)
print(t1*2)
- ([22, 1, 2, 3], [22, 1, 2, 3])
- ([44,1,4,6])
- Error
- Not defined
Answer: A) ([22, 1, 2, 3], [22, 1, 2, 3])
Explanation:
When you multiply any integer with the tuple it repeats the elements of the tuple that number of times.