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