Level 10 : What will this output?


lst = [1, 2, 3]
lst += [4]
lst *= 2
print(lst)

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