# coding: latin-1 li = ["un", "deux", "un", "trois"] d = { } for l in li : if l not in d : d [l] = 1 else : d [l] += 1 print d # affiche {'un': 2, 'trois': 1, 'deux': 1}