Level 9 : What will this output?


lst = [1, 2, 3]
lst.clear()
lst.extend([4, 5])
print(lst)

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