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