Level 9 : What will be the output of the following code?


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

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