Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
51
Task/Visualize-a-tree/Python/visualize-a-tree-2.py
Normal file
51
Task/Visualize-a-tree/Python/visualize-a-tree-2.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
>>> tree = "a",("b0",("c1","c2",("d",("ef","gh")),"c3",("i1","i2","i3",("jj"),"i4",("kk","m"))),"b1",("C1","C2",("D1",("E"),"D2","D3"),"C3"))
|
||||
>>> pprint(tree, width=1)
|
||||
('a',
|
||||
('b0',
|
||||
('c1',
|
||||
'c2',
|
||||
('d',
|
||||
('ef',
|
||||
'gh')),
|
||||
'c3',
|
||||
('i1',
|
||||
'i2',
|
||||
'i3',
|
||||
'jj',
|
||||
'i4',
|
||||
('kk',
|
||||
'm'))),
|
||||
'b1',
|
||||
('C1',
|
||||
'C2',
|
||||
('D1',
|
||||
'E',
|
||||
'D2',
|
||||
'D3'),
|
||||
'C3')))
|
||||
>>> copypasteoutput = ('a',
|
||||
... ('b0',
|
||||
... ('c1',
|
||||
... 'c2',
|
||||
... ('d',
|
||||
... ('ef',
|
||||
... 'gh')),
|
||||
... 'c3',
|
||||
... ('i1',
|
||||
... 'i2',
|
||||
... 'i3',
|
||||
... 'jj',
|
||||
... 'i4',
|
||||
... ('kk',
|
||||
... 'm'))),
|
||||
... 'b1',
|
||||
... ('C1',
|
||||
... 'C2',
|
||||
... ('D1',
|
||||
... 'E',
|
||||
... 'D2',
|
||||
... 'D3'),
|
||||
... 'C3')))
|
||||
>>> tree == copypasteoutput
|
||||
True
|
||||
>>>
|
||||
Loading…
Add table
Add a link
Reference in a new issue