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