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