Level 1 : Output of this snippet?


a = [1, 2, 3]
b = a[:]
b[0] = 99
print(a, b)

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