Changement chaine->list->sort() avec la fonction sort() de geoffrey
This commit is contained in:
parent
97ebe81584
commit
20ff4a469b
|
@ -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)
|
||||
|
||||
|
|
Reference in a new issue