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