Is The Following Python Code Validp Pre Langpython #472
Is the following Python code valid?</p> <pre><code class="language-python"> >>> a=(1,2,3,4) >>> del a </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.2.
Is the following Python code valid?
>>> a=(1,2,3,4) >>> del a
No because tuple is immutable
Yes, first element in the tuple is deleted
Yes, the entire tuple is deleted
No, invalid syntax for del method