Level 5 : What will be the output of the following code?


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

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