Level 9 : What will be the Output of following code?


q = [1,2,3,4]
p =q.cpoy()
p[1] = 10
print(q)

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