Level 10 : What will this print?


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

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