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