diff --git a/S2/TP2/tp2.py b/S2/TP2/tp2.py index 3c221af..e9f1858 100644 --- a/S2/TP2/tp2.py +++ b/S2/TP2/tp2.py @@ -426,9 +426,12 @@ question(1) def arbre_vers_liste(arbre): - # [[1, [3, 4]], [2, [3, 4]]] ⇒ [[1, 3], [1, 4], [2, 3], [2, 4]] + # [[1, [3, [4]]], [2, [3, [4]]]] ⇒ [[1, 3], [1, 4], [2, 3], [2, 4]] print(arbre) possibilites = [] + # for i in arbre: + + return possibilites @@ -458,5 +461,5 @@ def annagrammes_phrase(phrase): annagrammesMots = [anagrammes(i) for i in mots] return arbre_vers_liste(anagrammesArbre) -print(annagrammes_phrase('une dactylographié')) # DEBUG +print(annagrammes_phrase('orange orange orange')) # DEBUG