hi the code:

courses = ["banane", "orange", "pomme"]

stock = { "banane": 6,

"pomme": 0,

"orange": 32,

"poire": 15

}

prix = { "banane": 4,

"pomme": 2,

"orange": 1.5,

"poire": 3

}

# Ecrivez votre code ci-dessous :

def calculer_facture(course):

k = 0

for i in course:

print stock[i]

if int(stock[i]) == 0 or int(course[i]) > int(stock[i]):

k = k + int(prix[i]) * int(course[i])

stock[i] = 0

else:

k = k + int(prix[i]) * int(course[i])

stock[i] -= 1 * int(course[i])

return k

and the error:Oups, merci de rÃ©essayer. Appelant calculer_facture avec une liste contenant 1 pomme, 1 poire and 1 banane causÃ© l'erreur suivante: list indices must be integers, not str