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