From 23c8f27def0c22ca58992146f77fea776e970946 Mon Sep 17 00:00:00 2001 From: Antoine Van Elstraete Date: Tue, 25 Jan 2022 13:03:50 +0100 Subject: [PATCH] Travaille en majuscule --- wgamesolv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgamesolv.py b/wgamesolv.py index f758643..404434d 100755 --- a/wgamesolv.py +++ b/wgamesolv.py @@ -46,6 +46,7 @@ def firstTryFilter(mots, max_mots): def resolv_fl(liste, firstletter): # On ne garde que les mots qui commence par FirstLetter + firstletter = firstletter.upper() return [mot for mot in liste if mot[0] == firstletter] @@ -77,7 +78,7 @@ def resolv_kl(liste, lettres): Known Letters : élimination des mots ne comprenant pas les lettres validées (hors pattern) ''' - lettres = list(set(list(lettres))) + lettres = list(set(list(lettres.upper()))) MotsRestants = [] for mot in liste: if len(set(lettres).intersection(mot)) == len(lettres): @@ -90,7 +91,7 @@ def resolv_bl(liste, lettres): Bad Letters : élimination des mots contenant des lettres invalidées (hors pattern) ''' - lettres = list(set(list(lettres))) + lettres = list(set(list(lettres.upper()))) MotsSuppr = [] for mot in liste: for lettre in lettres: