Level 1 : After calling the fun function, what is the new content of the list p?


def fun(values):
    values[0] = 1
p = [2,3,4]
fun(p)
print(p)

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