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