Level 1 : What will the following code output?


t = (1, 2, 3, 4)
x, *y, z = t
print(x, y, z)

Author: SandhyaR | Tags: tuple | 1736+ Python FAQs | Share
complex-number | escape-operator | precedence | pep | keyword | multithreading | id-function | call | memory-management | virtual-environment | python-django | loop | objects | lambda | list-comprehension | expression | shallow-copy | descriptors | asyncio | copy | method | operator-and | application | list-comprehension | object-attribute | higher-order-function | operations | type_conversion | bitwise-operator | lambdas | filter | pandas | odd-number | dictionaries | return-statement | max-min | filter-function | name-mangling | set-operation | package-management | binary-operation | operator-overloading | collections | module | typeerror | slice | __all__-attribute | input-function | data-structure | zfill-function | floating-point-precision | assert | deep-copy | split | match | logical-operator | condition | input | logical-operation | matplotlib | built-in | string-concatenation | operators | exception-handling | loops | sum-function | nested-loop | tuple-unpacking | decorator | design-principle | polymorphism | file-handling | pseudocode | __init_subclass__ | generator | type-conversion | class | global-variable | type-conversion | statement | generators | string-formatting | append | string-formatting | mathematical-function | int | expand-tab | list | attribute | array | sys | string-method | conversion | multiple-inheritance | python-history | string | global-keyword | counter | raise | data-structure | operator | string-slicing | constructor | conditional-statement | oops | identifier | counter-function | bitwise | random | regular-expression | exception-handling | while-and-for-loop | data-type | immutability | indexing | indentation | math | sys-module | list-indexing | functional-programming | comprehension | mathematics | round | basic | decimal | parameter | destructor | postfix | factorial-function | integer | installation | touples | namedtuple | sorting | loop-control | version-check | syntax | threading | control-flow | data-structures | heap-memory | mapping-function | iterable | matrix | python-module | center | oop | goto-function | function-argument | zip-function | datatype | list-mutation | virtual-environment | assignment-operator | update | exception | with-statement | arithmetic-operation | stack | lambda-function | formal-and-actual-parameter | list-join | function | while-loop | iterator | operand | staticmethod | sum() | print | dictionary | feature | random-function | min-function | while-else-loop | error-handling | list-slicing | string-manipulation | data-type | frozenset | immutable-data-type | list-operation | init | control-flow | turtle | slicing | matrix-list-comprehension | regex | scientific-notation | classes | string-method | boolean-and-non-boolean | input-function | python-repl | syntaxerror | class-and-object | interpreter | recursion | access-modifier | string-slicing | global-variable | comparison | variable | round-function | inheritance | mutable | recurssion | identity-operator | format | zip | multiprocessing | __future__ | syntax-error | error | library | magic-method | class-and-inheritance | rollback | file | set | global | encapsulation | list-method | operator-or | tuple | software-design | collection | yield | compute | mysql | conditional-statement | data_structure | precedence-and-associativity | overflow | invalid-list | python | generators-in-python | numeric | print-statement | command-line-parsing | range | lists | python_version | inherit | built-in-function | file_handling | math-copysign | for | memory | encoding | swapping | fabs-function | identity-operator | functions | def | sorted | version | list-vs-tuple | boolean | asyncio-module | complex | default-mutable-argument | function-and-scope | docstring | head-and-tail | dicts | min-max-function | gil | exponentiation | implementation | static-method | arithmetic-expression | async | join | debugging | datetime | else-statement | logical-operator | methods | import-method | numpy | choice | built-in-function | control-statement | binary | file-handling | pickling-&-unpickling | benefit | thread | comment | class-and-instance-variable | context-manager | namespace | string-iteration | map-function | enumerate() | bitwise-operator | syntax-error ...