diff --git a/S2/TP2/tp2.py b/S2/TP2/tp2.py index 559661d..d67f21a 100644 --- a/S2/TP2/tp2.py +++ b/S2/TP2/tp2.py @@ -212,13 +212,10 @@ def sont_anagrammes1(chaine1, chaine2): if len(chaine1) != len(chaine2): return False - l1 = list(chaine1) - l2 = list(chaine2) + c1 = sort(chaine1) + c2 = sort(chaine2) - l1.sort() - l2.sort() - - return l1 == l2 + return c1 == c2 question(2)