Level 10 : What will be the output of the following code snippet?


a = 3
b = 1 
print(a, b)
a, b = b, a 
print(a, b)

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