一 构建树的结构
二 代码
G =['G',[]]
H =['H',[]]
I =['I',[]]
K =['K',[]]
E =['E',[G,H,I,K]]
D =['D',[]]
F =['F',[]]
A =['A',[D,E]]
B =['B',[]]
C =['C',[F]]
Root=['Root',[A,B,C]]
print(Root)
三 运行结果
['Root', [['A', [['D', []], ['E', [['G', []], ['H', []], ['I', []], ['K', []]]]]], ['B', []], ['C', [['F', []]]]]]