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