Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
>>> a=(1,2)
>>> b=(3,4)
>>> c=a+b
>>> c

What will be the output of the following Python code?
>>> a=(1,2)
>>> b=(3,4)
>>> c=a+b
>>> c
a) (4,6)
b) (1,2,3,4)
c) Error as tuples are immutable
d) None

Answer: b
Explanation: In the above piece of code, the values of the tuples aren’t being changed. Both the tuples are simply concatenated.

Join The Discussion