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