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