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