Level 6 : Output of this code?


lst = [2, 3, 4]
print(lst.pop(0), lst.pop(-1))

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