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 | 1736+ Python FAQs | Share
head-and-tail | shallow-copy | operators | integer | dictionary | expression | factorial-function | package-management | immutable-data-type | function-argument | turtle | comment | generator | else-statement | python_version | __all__-attribute | magic-method | virtual-environment | conversion | logical-operator | fabs-function | string-manipulation | input-function | return-statement | string-method | staticmethod | zfill-function | counter-function | data-structure | complex-number | exponentiation | stack | string-concatenation | pseudocode | recursion | async | precedence-and-associativity | binary-operation | oop | conditional-statement | control-statement | global-variable | compute | call | access-modifier | filter-function | bitwise-operator | tuple-unpacking | comprehension | destructor | global-variable | benefit | random-function | memory-management | installation | yield | datatype | python-history | lambdas | parameter | lists | assignment-operator | loop-control | string-iteration | type-conversion | join | round-function | def | zip | multiple-inheritance | oops | math | filter | version | file-handling | encapsulation | numeric | logical-operation | descriptors | split | string-method | polymorphism | string-formatting | mutable | scientific-notation | counter | virtual-environment | assert | numpy | keyword | string-formatting | sum() | classes | heap-memory | operator-or | function | version-check | collection | loops | swapping | attribute | zip-function | built-in-function | software-design | expand-tab | multiprocessing | collections | data_structure | rollback | operator-and | formal-and-actual-parameter | with-statement | iterator | overflow | complex | array | regex | operator | command-line-parsing | arithmetic-operation | class-and-instance-variable | generators-in-python | pickling-&-unpickling | list-operation | format | syntaxerror | type_conversion | design-principle | list-method | indexing | function-and-scope | list-comprehension | statement | while-else-loop | random | raise | pep | built-in | identifier | operations | touples | list-slicing | invalid-list | control-flow | matrix | string-slicing | default-mutable-argument | string | syntax-error | higher-order-function | multithreading | mathematical-function | variable | bitwise-operator | math-copysign | matplotlib | recurssion | center | set | comparison | pandas | thread | list-join | global | file_handling | update | inheritance | data-structure | sys | exception | data-type | control-flow | print-statement | global-keyword | lambda-function | context-manager | import-method | decimal | while-and-for-loop | postfix | docstring | asyncio-module | mapping-function | matrix-list-comprehension | input | python-django | typeerror | constructor | choice | for | class-and-inheritance | decorator | loop | immutability | int | sorting | class | list-vs-tuple | objects | goto-function | debugging | generators | min-max-function | copy | implementation | object-attribute | sys-module | init | datetime | sum-function | odd-number | list-indexing | identity-operator | operand | interpreter | functional-programming | data-type | set-operation | python | __init_subclass__ | id-function | mathematics | file | deep-copy | dictionaries | memory | sorted | inherit | identity-operator | method | class-and-object | map-function | min-function | python-repl | mysql | operator-overloading | match | __future__ | error | round | precedence | library | feature | while-loop | threading | basic | asyncio | input-function | arithmetic-expression | syntax-error | escape-operator | slicing | tuple | list-comprehension | dicts | conditional-statement | nested-loop | static-method | frozenset | slice | gil | string-slicing | floating-point-precision | python-module | type-conversion | indentation | data-structures | print | file-handling | methods | condition | boolean | range | boolean-and-non-boolean | exception-handling | logical-operator | list | application | namespace | bitwise | lambda | append | syntax | exception-handling | built-in-function | enumerate() | max-min | functions | module | list-mutation | binary | encoding | namedtuple | regular-expression | error-handling | iterable | name-mangling ...