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