class tree: def __init__(self , liste): self.racine = liste[0].data self.noeud = liste[1:] A = node("A" , None , None) B = node("B" , "A" , "Gauche") C = node("C" , "A" , "Droit") D = node("D" , "B" , "Gauche") E = node("E" , "B" , "Droit") F = node("F" , "C" , "Droit") G = node("G" , "E" , "Gauche") H = node("H" , "E" , "Droit") I = node("I" , "F" , "Gauche") arbre = tree([A,B,C,D,E,F,G,H,I]) print( arbre.noeud[2].data , "est le fils" , arbre.noeud[2].position , "de" , arbre.noeud[2].parent)