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