def create_dictionary(filename) : #marche sur thonny mais pas ici ?? d = {} f = open(filename) for line in f : word = line.strip("\n") try : value = d[word] valueN = value + 1 d[word] = valueN except : d[word] = 1 return d def occ(dictionnary, word) : occ = dictionnary[word] return occ