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