Level 1 : What will be the result?


import copy
a = [1, [2, 3]]
b = copy.deepcopy(a)
a[1][0] = 99
print(a, b)

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