Level 1 : 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

Author: SandhyaR | Tags: namedtuple | 1736+ Python FAQs | Share
data-type | init | scientific-notation | nested-loop | input | integer | identifier | random-function | decimal | syntax-error | list-comprehension | call | object-attribute | goto-function | context-manager | iterable | touples | update | data-structure | set-operation | append | fabs-function | floating-point-precision | name-mangling | mathematical-function | string-formatting | while-else-loop | max-min | python-repl | function | lambda-function | application | bitwise-operator | command-line-parsing | invalid-list | indentation | binary | list-vs-tuple | syntaxerror | list | raise | conversion | binary-operation | collections | functional-programming | precedence-and-associativity | print-statement | asyncio-module | mathematics | control-flow | classes | sorting | data-structures | round | tuple | list-slicing | math | mutable | gil | threading | bitwise | head-and-tail | control-flow | postfix | inherit | software-design | built-in | yield | recurssion | data-structure | comparison | join | global | enumerate() | assignment-operator | debugging | swapping | exception-handling | precedence | set | exception | counter | input-function | inheritance | descriptors | sum() | file | mapping-function | namedtuple | installation | function-and-scope | class-and-inheritance | decorator | slice | arithmetic-expression | list-method | sys | python-history | dicts | version-check | arithmetic-operation | typeerror | feature | iterator | pseudocode | global-variable | input-function | encapsulation | filter-function | pandas | loop | variable | def | class-and-instance-variable | magic-method | while-loop | expand-tab | range | staticmethod | function-argument | list-indexing | matrix | while-and-for-loop | expression | async | map-function | datatype | class-and-object | virtual-environment | error-handling | zip-function | default-mutable-argument | slicing | matrix-list-comprehension | exponentiation | logical-operator | factorial-function | keyword | mysql | zip | design-principle | round-function | sorted | attribute | rollback | multiple-inheritance | functions | list-comprehension | logical-operator | statement | split | operator-and | boolean-and-non-boolean | version | interpreter | matplotlib | error | conditional-statement | counter-function | method | library | generators | conditional-statement | odd-number | type_conversion | indexing | namespace | turtle | dictionaries | pep | generator | encoding | bitwise-operator | immutability | multithreading | filter | exception-handling | center | asyncio | oops | operations | logical-operation | return-statement | min-function | oop | immutable-data-type | min-max-function | operand | copy | choice | type-conversion | for | string-slicing | assert | numpy | lists | global-variable | tuple-unpacking | random | list-mutation | comment | package-management | syntax | overflow | operators | benefit | built-in-function | list-operation | file-handling | thread | else-statement | list-join | string-manipulation | static-method | __future__ | match | zfill-function | virtual-environment | id-function | identity-operator | string-formatting | operator-or | sum-function | multiprocessing | shallow-copy | lambda | comprehension | docstring | string-slicing | recursion | regular-expression | polymorphism | constructor | lambdas | control-statement | with-statement | formal-and-actual-parameter | condition | string-concatenation | __init_subclass__ | complex-number | math-copysign | objects | string-iteration | pickling-&-unpickling | built-in-function | numeric | loops | array | identity-operator | dictionary | string-method | python-django | format | methods | module | destructor | data-type | datetime | generators-in-python | boolean | basic | python | string | operator | stack | type-conversion | heap-memory | collection | implementation | import-method | global-keyword | loop-control | complex | operator-overloading | parameter | __all__-attribute | higher-order-function | frozenset | print | int | data_structure | python-module | sys-module | class | regex | access-modifier | memory-management | deep-copy | string-method | syntax-error | escape-operator | file_handling | file-handling | memory | python_version | compute ...