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