CBSE Class 11 Computer Science Question 9 of 114

Tuples — Question 9

Back to all questions
9
Question

Question 9

What does a + b amount to if a and b are tuples?

Answer

Given a and b are tuples, so in this case the + operator will work as concatenation operator and join both the tuples.

For example:
a = (1, 2, 3)
b = (4, 5, 6)
c = a + b

Here, c is a tuple with elements (1, 2, 3, 4, 5, 6)