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