Level 10 : What will this output?


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

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