Hi All,
I have as input a list of tuples (child, parent).
Given that a child only have one parent.
I would like for every child to build an ordered ancestors list.
Any tip ?
input would be like : [('3', '4'), ('1', '2'), ('2', '3')]
output would be like:
1, [2, 3, 4]
2, [3, 4]
3, [4]
4, [None]