Question 3
Given the following code snippet, what will be the output?
a = (1, 2)
b = (3, 4)
c = ((5, 6),)
d = a + b + c
e = d[2:]
f = d[:2] + (e[2],)
print(f)
(3, 4, (5, 6))
(3, 4, 5, 6)
(1, 2, (5, 6))
(1, 2, 5, 6)
Given the following code snippet, what will be the output?
a = (1, 2)
b = (3, 4)
c = ((5, 6),)
d = a + b + c
e = d[2:]
f = d[:2] + (e[2],)
print(f)
(3, 4, (5, 6))
(3, 4, 5, 6)
(1, 2, (5, 6))
(1, 2, 5, 6)
Correct answer
(1, 2, (5, 6))
Question 3 of 18 in the IIT Madras BS Programming in Python (Python) End Term paper sat on 31 Aug 2025, in the May 2025 term (IIT M FOUNDATION AN EXAM QDF3 31 Aug 2025). It carries 3 marks.