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.

Is the following Python code valid?
>>> a=2,3,4,5
>>> a

Is the following Python code valid?
>>> a=2,3,4,5
>>> a
a) Yes, 2 is printed
b) Yes, [2,3,4,5] is printed
c) No, too many values to unpack
d) Yes, (2,3,4,5) is printed

Answer: d
Explanation: A tuple needn’t be enclosed in parenthesis.

Join The Discussion