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