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