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


p = 8, s = 18
p,s = s,p
print(p,s)

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