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