How to get the list of children and grandchildren from a nested structure?
How to get the list of children and grandchildren from a nested structure? Question: Given this dictionary of parent-children relations, { 2: [8, 7], 8: [9, 10], 10: [11], 15: [16, 17], } I’d like to get the list of all children, grandchildren, great-grandchildren, etc. — e.g. given a parent with an ID 2 I …
Total answers: 1