How to have accents in my program (e.g. é, è, à, á) - Python
<p>I don't have that much experience programming in python, so my question might be very simple. I am working on a project for school, where we need to create an output from a user input (we want to emulate Eliza, but in a very simple way). Right now, the only thing the program does is look for keywords and respond accordingly. However, since I go to a french school and everything is in french, I need to use accents (e.g. é, è, à, á). And this is where the problem arrives: I cannot use accents in my predefined list of keywords (so it's not the keywords from the user input, but in my own program :/ )</p>

<p>Here you have the entire program:</p>

<pre><code>#Greeting from bot
print("Salut!")
</code></pre>

<p><em>(Here are the predefined keyword we use to know if there is a negation and if there are any demeaning adjectives in the user's sentence - we'll need to make it a lot bigger in order to make our bot more humanlike but it's just the principle)</em></p>

<pre><code>negation = ("ne", "n'", "pas", "guere", "ne", "plus", "jamais")
AnD = ("artificiel", "cree", "mecanique", "invente", "concu", "construit", "programme", "innove", "fabrique")
</code></pre>

<p>But here is the problem: in order to run our program, we had to remove all the accents. So words like <em>guère, créé, mécanique, inventé, programmé</em> become <em>guere, cree, mecanique, invente, programme</em>, and in some cases it changes the meaning of the word (e.g. <em>programme</em> becomes a noun instead of an adjective) </p>

<pre><code>adj_neg_decl = None
nega = None

#FONCTION: phrase declarative, pas de negations, adjectif pejoratif
def decl_non_neg_adj_neg(statement):
    if (statement.endswith('.')) and (nega == False) and (adj_neg_decl == True):
        print(AnD_ici + '? Mais moi je suis humain. Ca se voit pas?')
    else:
    #Only for testing
        print('tralalalala')


while True:

    statement = raw_input("&gt; ").lower()

    if statement == "au revoir":
        print("Au revoir!")
        break
</code></pre>

<p><em>(Here we simply look for negations, and adjectives - if you have another (more efficient) way of doing it, I would love to hear your suggestions! I might as well learn some new stuff :) )</em></p>

<pre><code>    for i in negation:
        if i in statement:
            nega = True
            break
        else:
            nega = False

    for i in AnD:
        if i in statement:
            adj_neg_decl = True
            AnD_ici = i
            break
        else:
            adj_nej_decl = False

    decl_non_neg_adj_neg(statement)

#Reset variables
    for var in (adj_neg_decl, nega):
        var = None
</code></pre>

<p>I had thought of maybe using unicode or utf-8, but I don't really know how to use it... Is that the right way to go? Or is there something else I can do?</p>

<p>Thank you so much for your help :)</p>