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