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