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


t = (1, 2, 3)
t[1] = 4

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