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