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"))
  1. It will show you the error as tuples are immutable
  2. ('hello', 'hi', 'Include helps', 'Welcome you all')
  3. ('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.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.