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