TP2 Avancement Annagrammes phrases
Avant ragequit
This commit is contained in:
parent
062cb672b6
commit
72d65973dc
|
@ -426,9 +426,12 @@ question(1)
|
||||||
|
|
||||||
|
|
||||||
def arbre_vers_liste(arbre):
|
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)
|
print(arbre)
|
||||||
possibilites = []
|
possibilites = []
|
||||||
|
# for i in arbre:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return possibilites
|
return possibilites
|
||||||
|
|
||||||
|
@ -458,5 +461,5 @@ def annagrammes_phrase(phrase):
|
||||||
annagrammesMots = [anagrammes(i) for i in mots]
|
annagrammesMots = [anagrammes(i) for i in mots]
|
||||||
return arbre_vers_liste(anagrammesArbre)
|
return arbre_vers_liste(anagrammesArbre)
|
||||||
|
|
||||||
print(annagrammes_phrase('une dactylographié')) # DEBUG
|
print(annagrammes_phrase('orange orange orange')) # DEBUG
|
||||||
|
|
||||||
|
|
Reference in a new issue