Is The Following Python Code Validp Pre Langpython #478
Is the following Python code valid?</p> <pre><code class="language-python"> >>> a,b=1,2,3 </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Tuples - Python Tuples - Quiz No.3.
Is the following Python code valid?
>>> a,b=1,2,3
Yes, this is an example of tuple unpacking. a=1 and b=2
Yes, this is an example of tuple unpacking. a=(1,2) and b=3
No, too many values to unpack
Yes, this is an example of tuple unpacking. a=1 and b=(2,3)