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