Level 9 : What will this code output?


t = (1, 2, 3)
for i in range(len(t)):
    t += (t[i],)
print(t)

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