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