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