Q:

Check if a Non-ASCII word exists in a string List

I have this list scraped from a web page
scraped = ['24 hour front desk', 'Bar / Lounge', 'Business centre', 'Café']

I want to check whether Cafe exists in the list or not?
I am doing this:
if "Caf" in scraped:
 print("Yes")
else:
 print("No")

It always prints No 
Reason I am writing Caf that from the scraped list, it always comes in non-ascii character Café
How can I perform this check without doing this # -*- coding: utf-8 -*-?

A:

if "Caf" in scraped:

checks if the literal string "Caf" is in the list, which it is not.
To check if "Caf" is in any of the strings in the list, use:
if any("Caf" in s for s in scraped)

To check for non-ascii characters, you can always use unicode escape sequences:
>>> "Caf\xe9" == 'Café' 
True`

