Home »
Python »
Python Tuples MCQs
What will be the output of the following code? | Tuples Que. 36
36. What will be the output of the following code?
t1=("hello","hi")
print(t1+("Include helps","Welcome you all"))
- It will show you the error as tuples are immutable
- ('hello', 'hi', 'Include helps', 'Welcome you all')
- ('hello', 'hi') ('Include helps', 'Welcome you all')
Answer: B) ('hello', 'hi', 'Include helps', 'Welcome you all')
Explanation:
Tuples are immutable but you can concatenate another tuple inside a tuple.