Level 10 : What is the output of the following code?


list1 = ['apple', 'bat', 'cat']
list2 = [1, 2, 3]

list1.extend(list2)
print(list1)

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