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