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