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