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