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