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