diff --git a/wgamesolv.py b/wgamesolv.py index 23cdf84..d5ca283 100755 --- a/wgamesolv.py +++ b/wgamesolv.py @@ -96,12 +96,7 @@ def resolv_bl(liste, lettres): for lettre in lettres: if lettre in mot: MotsSuppr.append(mot) - for mot in MotsSuppr: - try: - liste.pop(liste.index(mot)) - except ValueError: - pass - return liste + return [mot for mot in liste if not mot in MotsSuppr] if __name__ == "__main__":