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