Level 1 : What happens if you execute the following code?


t = (1, 2, 3)
t *= 2
print(t)

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