Level 10 : what is the output of the below list method?


l=list('1234')
l[0]=l[1]=5
print(l)

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