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