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