Level 10 : What will be the output of the following code snippet?


def solve(a):
   a = [1, 3, 5]
a = [2, 4, 6]
print(a)
solve(a)
print(a)

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