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