Optimisation de "noDouble()"
This commit is contained in:
parent
6603f4012e
commit
25669da340
@ -20,13 +20,9 @@ def noDouble(mots):
|
|||||||
# Fonction d'élimination de mots contenant plusieurs occurences de lettres
|
# Fonction d'élimination de mots contenant plusieurs occurences de lettres
|
||||||
ndList = []
|
ndList = []
|
||||||
for mot in mots:
|
for mot in mots:
|
||||||
llist = []
|
if len(list(mot)) == len(set(list(mot))):
|
||||||
for lettre in mot:
|
|
||||||
if lettre not in llist:
|
|
||||||
llist.append(lettre)
|
|
||||||
if len(mot) == len(llist):
|
|
||||||
ndList.append(mot)
|
ndList.append(mot)
|
||||||
return(ndList)
|
return ndList
|
||||||
|
|
||||||
|
|
||||||
def firstTryFilter(mots, max_mots):
|
def firstTryFilter(mots, max_mots):
|
||||||
|
Loading…
Reference in New Issue
Block a user