# encoding: utf-8 import unicodedata #Ce module donne accès à la base de données des caractères Unicode #ce qui permet de convertir les caractères accentués def nettoyage(texte): if ".txt" in texte: fichier=open(texte,'r') texte=fichier.read() fichier.close() texte = unicodedata.normalize('NFKD', texte).encode('ascii','ignore').decode() alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" nbcar=len(texte) texteformate="" for k in range(nbcar): j=0 trouve=0 while (j