CBSE Class 11 Computer Science Question 83 of 114

Tuples — Question 20

Back to all questions
20
Question

Question 3(d)

Carefully read the given code fragments and figure out the errors that the code may produce.

t1 = (3,)  
t2 = (4, 5, 6)  
t3 = t1 + t2  
print (t3)
Answer
Output
(3, 4, 5, 6) 
Explanation

t1 is a single element tuple since comma is added after the element 3, so it can be easily concatenated with other tuple. Hence, the code executes successfully without giving any errors.