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