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