What will be the result of (1, 2) + (3, 4) in Python?
-
A
(1, 2, 3, 4)
Correct answer
-
B
(1, 2) (3, 4)
-
C
(4, 3, 2, 1)
-
D
Error
Correct answer
A. (1, 2, 3, 4)
13 views
Explanation
The + operator concatenates tuples, so (1, 2) + (3, 4) results in (1, 2, 3, 4).
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ