Level 9 : What will be the output?


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

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