Level 10 : what is the output of the following code?


x = 'Cup'
y = 'Coffee'
z = y-x
print(z)

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