Level 6 : Output of this code?


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

Author: SandhyaR | Tags: list | 1859+ Python FAQs | Share
datetime.date,-datetime.time,-datetime.datetime | python-repl | sets | namespace | multiprocessing | math | operator-and | precedence-and-associativity | overriding-methods | reading-and-writing-files | operator | nested-loop | name-mangling | pandas | matplotlib | raise | pseudocode | operations | python-history | python | virtual-environment | type-conversion-and-casting | oops | memory-management | condition | loops | working-with-temporary-files-using-tempfile | immutable-data-type | __init_subclass__ | else | data-structures | conditional-statement | bitwise | bitwise-operator | intering | identity-operators-(is,-is-not) | boolean-and-non-boolean | boolean-masking | data_structure | invalid-list | interpreter | generator | dictionary | list | global-variable | creating-custom-modules | datetime | debugging | dictionaries | list-join | introduction-to-python | data-structures-in-python | counter-function | default-arguments | class | iterable | docstring | iterator | built-in | data-structure | advanced-file-operations | complex | access-modifier | formal-and-actual-parameter | filter-function | multithreading | round | method | touples | matrix | zip | precedence | unit-testing | class-decorators | parameter | lists | print-statement | why-use-multiprocessing-over-threading?-(gil) | asyncio | reading:-read(),-readline(),-readlines() | range | rollback | static-method | sys | string-manipulation | python-module | joining-and-merging-dataframes | recurssion | tuple-methods | recursion | anchors-(^,-$) | list-slicing | type-conversion | memory | assert | postfix | data-type | set | creating-and-starting-threads | data-type | syntax | regex | lambda-functions | string-slicing | introduction-to-threads | input | zip-function | working-with-binary-files-(rb,-wb) | matrix-list-comprehension | working-with-file-paths | round-function | heap-memory | random-function | exception | walking-through-directories-using-os.walk() | pickling--unpickling | odd-number | arbitrary-arguments-(*args,-**kwargs) | sys-module | expand-tab | python-syntax-and-structure | filter | encoding | dictionary-comprehensions | strings | lambdas | design-principle | identity-operator | data-types | installation | magic-method | integer | multiple-inheritance | working-with-dates-and-times | string | swapping | immutability | split | math-copysign | global-keyword | syntaxerror | using-yield-in-functions | python-django | turtle | update | higher-order-function | arithmetic-operation | polymorphism | inheritance | yield | numeric | built-in-modules | counter | operator-overloading | library | class-and-object | regular-expression | syntax-error | variable | datatype | raise-statement | frozenset | iterators | conditional-statement | built-in-function | floats | comparison | logical-operators | assignment-operators | mutable | scientific-notation | writing:-write(),-writelines() | oop | using-os-and-pathlib-modules | pep | difference-between-threads-and-processes | objects | parsing-with-strptime | input-function | directory-operations | sorting-and-ranking | context-manager | multiple-except-blocks | generators-in-python | basic | encapsulation | indentation | set-operation | string-method | feature | introduction-to-multiprocessing | decimal | init | thread | multiple-inheritance | typeerror | return-statement | id-function | reading-and-writing-large-files-efficiently | list-operation | list-comprehension | factorial-function | function-and-scope | min-function | sorted | assignment-operator | classes | generators | opening-files-(open()) | control-statement | mysql | literal-characters-and-special-characters | python_version | dicts | gil | binary-operation | built-in-function | constructor | functions | managing-directories-with-os-and-shutil | shallow-copy | copy | list-comprehension | type_conversion | python-operators | string-iteration | stack | data-type-conversions | control-flow | version | loop | staticmethod | exception-handling | fabs-function | join | file_handling | array | lambda-function | using-lists-as-stacks | else-statement | mathematics | async | operators | def | functional-programming | overflow | loop-control-statements | handling-missing-values-(fillna,-dropna) | virtual-environment | zfill-function | implementation | escape-operator | logical-operator | single-inheritance | namedtuple | decorator | file-handling | list-comprehensions | head-and-tail | numpy | keyword | tuple-unpacking | slice | list-indexing | file-handling | quantifiers-(*,-+,-?,-{}) | for | asyncio-module | data-structure | using-map()-for-transformations | aggregating-data-with-functools.reduce() | using-join()-and-is_alive()-methods | loop-control | object-attribute | benefit | list,-set,-and-dictionary-comprehensions | formatting-with-strftime | using-assertions-(assertequal,-assertraises) | tuple | version-check | global-variable | match | int | error | comment | global | attribute | import-method | floating-point-precision | max-min | sum-function | append | software-design | collections | indexing:-loc-vs-iloc | while-and-for-loop | lambda | functional-programming | exponentiation | string-formatting | using-the-threading-module | tuples | string-formatting | random | inherit | package-management | list-methods-and-slicing | descriptors | control-flow | format | print | string-methods | operand | complex-number | booleans | defining-functions | arithmetic-expression | using-else-and-finally | integers | dictionary-methods | identifier | test-discovery | file | identity-operator | pass | thread-synchronization | while-else-loop | deep-copy | error-handling | collection | operator-or | conditional-statements | with-statement | center | sum() | time-series-with-pandas | class-and-inheritance | filtering-and-indexing | method-overloading | function-argument | comprehension | mathematical-function | input-function | sorting | thread-safe-data-structures-(queue.queue) | list-method | string-concatenation | bitwise-operator | function | list-mutation | while-loops | application | boolean | __future__ | dataframe-and-series-objects | map-function | key-value-pairs | conversion | list-vs-tuple | string-slicing | statement | command-line-parsing | syntax-error | class-and-instance-variable | enumerate() | exception-handling | module | membership-operators-(in,-not-in) | destructor | error-handling | while-loop | threading | logical-operation | type-conversion | compute | slicing | default-mutable-argument | methods | expression | choice | call | binary | regular-expressions | goto-function | mapping-function | indexing | __all__-attribute | logical-operator | min-max-function | string-method ...