What Will Be The Output Of The Following Python Codep Pre #481
What will be the output of the following Python code?</p> <pre><code class="language-python"> >>> import collections >>> a=collections.namedtuple('a',['i','j']) >>> obj=a(i=4,j=7) >>> obj </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.
What will be the output of the following Python code?
>>> import collections >>> a=collections.namedtuple('a',['i','j']) >>> obj=a(i=4,j=7) >>> obj
a(i=4, j=7)
obj(i=4, j=7)
(4,7)
An exception is thrown