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