Level 1 : what is the output of the code?


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

Author: VenuEmmela | Tags: list | 1736+ Python FAQs | Share
operator | attribute | pandas | library | multiple-inheritance | match | file_handling | string-iteration | access-modifier | complex-number | function-and-scope | map-function | parameter | list-mutation | control-statement | string-slicing | list-join | feature | immutable-data-type | magic-method | factorial-function | list-vs-tuple | pseudocode | interpreter | classes | dicts | list-method | assert | format | collection | python-repl | print-statement | polymorphism | generators | basic | counter-function | comment | string-slicing | identifier | id-function | file-handling | keyword | command-line-parsing | operand | update | precedence | identity-operator | namedtuple | swapping | tuple-unpacking | built-in-function | decimal | operations | memory-management | multithreading | counter | threading | dictionary | binary-operation | version-check | assignment-operator | while-loop | string | file-handling | conversion | conditional-statement | goto-function | postfix | list-operation | operator-overloading | type-conversion | python-module | debugging | recurssion | filter-function | pep | round-function | string-method | logical-operation | stack | object-attribute | mapping-function | thread | destructor | recursion | inheritance | append | operators | turtle | variable | implementation | regex | syntax | bitwise | rollback | loop | built-in-function | print | typeerror | data-structure | string-concatenation | mutable | bitwise-operator | string-method | scientific-notation | condition | compute | data-type | import-method | indexing | python-history | syntaxerror | global-variable | formal-and-actual-parameter | immutability | package-management | for | escape-operator | set-operation | type-conversion | datetime | docstring | split | precedence-and-associativity | int | sys | floating-point-precision | list-comprehension | loops | shallow-copy | mathematics | deep-copy | asyncio-module | bitwise-operator | init | collections | string-formatting | round | encapsulation | iterable | else-statement | file | center | arithmetic-operation | expand-tab | call | fabs-function | virtual-environment | generator | zip | logical-operator | odd-number | conditional-statement | set | lists | decorator | benefit | application | input | data-type | head-and-tail | method | input-function | context-manager | frozenset | raise | static-method | exception | expression | lambdas | slice | min-function | boolean-and-non-boolean | list-indexing | methods | logical-operator | numeric | string-manipulation | exception-handling | zip-function | lambda-function | tuple | list | higher-order-function | math-copysign | python_version | operator-and | pickling-&-unpickling | class-and-inheritance | invalid-list | choice | def | syntax-error | staticmethod | installation | integer | oops | class | input-function | random | while-else-loop | class-and-instance-variable | indentation | mysql | descriptors | list-slicing | sum-function | control-flow | function-argument | module | asyncio | min-max-function | max-min | lambda | class-and-object | dictionaries | function | namespace | software-design | virtual-environment | enumerate() | range | design-principle | comparison | __future__ | global | exception-handling | statement | regular-expression | sorting | __init_subclass__ | copy | built-in | global-keyword | mathematical-function | inherit | overflow | type_conversion | multiprocessing | matrix | python | filter | default-mutable-argument | zfill-function | comprehension | boolean | error | gil | iterator | objects | functional-programming | return-statement | while-and-for-loop | operator-or | yield | data-structure | syntax-error | heap-memory | oop | string-formatting | functions | control-flow | version | exponentiation | math | __all__-attribute | join | data_structure | nested-loop | touples | sum() | arithmetic-expression | matplotlib | list-comprehension | name-mangling | slicing | matrix-list-comprehension | random-function | with-statement | constructor | python-django | encoding | async | data-structures | loop-control | generators-in-python | global-variable | memory | sorted | array | numpy | complex | datatype | binary | sys-module | error-handling | identity-operator ...