def constructionArbre(l): A = Arbre() if len(l) == 0: showinfo("Erreur", "Le fichier est vide") return A elif len(l) == 1: A = Feuille(l[0]) return A A.gauche = Feuille(l[0]) A.droit = Feuille(l[1]) for i in range(2, len(l)): A = A.constructionArbre(l[i]) A.equilibre() return A