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