X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=convert_dico.py;h=3a8362c14b4d1c34d6e1e9e62866ba7e13166f9a;hb=b20190694046a227741c83e8f26b54098e9d7745;hp=1e5d187736d37449f574b0728931fa4bbbf7ae56;hpb=c3f4e4d4a35613531475e7cfec95cf76021e8a5d;p=bots%2Fhung.git diff --git a/convert_dico.py b/convert_dico.py index 1e5d187..3a8362c 100644 --- a/convert_dico.py +++ b/convert_dico.py @@ -44,11 +44,11 @@ def maju(texte): texte=texte.replace(avant,apres) return texte.upper() -l=[[maju(i[0]),i[1].replace("\\n","; ")] for i in l - if len(i[0])>=8 and not " " in i[0]] -print l[0] -print l[1] -print l[2] +l=[[maju(i[0]),i[0]+" : "+i[1].replace("\\n","; ")] for i in l + if len(i[0])>=8 + and not " " in i[0] + and not i[0][-1]=='-'] # les mots finissant par un tiret foiraient + # en plus ils sont pas intéressants, donc on vire f1=open("mots.txt.out","w") f2=open("definitions.txt.out","w")