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