Questions terminées sauf la construction du dictionnaire

This commit is contained in:
Jean-Loup Beaussart 2015-02-03 11:28:03 +01:00
parent 98ea39de32
commit f546f34af4

View file

@ -379,14 +379,20 @@ def cle(mot):
assert(type(mot) == str) assert(type(mot) == str)
cpy = list(bas_casse_sans_accent(mot)).sort() cpy = sort(bas_casse_sans_accent(mot))
return str(cpy) return cpy
question(3) question(3)
ANAGRAMMES = {cle(i): anagrammes(i) for i in LEXIQUE} ANAGRAMMES = dict()
l=list()
for i in LEXIQUE:
k = cle(i)
print(len(ANAGRAMMES)) print(len(ANAGRAMMES))
@ -417,8 +423,11 @@ section('Comparaison des deux méthodes')
question(1) question(1)
for i in range(30): for i in range(30):
print(len(anagrammes(i)))
for i in range(30):
print(len(anagrammes2(i)))
partie('Phrases d\'anagrammes') # Geoffrey partie('Phrases d\'anagrammes') # Geoffrey