Level 1 : what is the output of the code?


list = list("1234")
list[0] = list[1] = 5
print(list)

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