Level 10 : What will the following code output?


t = (1, 2, 3, [4, 5])
t[3].append(6)
print(t)

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