Let us assume to have the following tree structure:
a = [(1, 2), (2, 2), (3, 2), (4, 2), (5, 4), (6, 5), (7, 8), (8, 11), (9, 10), (10, 11), (11, 11)]
so we get with this code Python - Generate a dictionary(tree) from a list of tuples the structure
[{'id': 2, 'Children': [{'id': 1}, {'id': 3}, {'id': 4, 'Children': [{'id': 5, 'Children': [{'id': 6}]}]}]}, {'id': 11, 'Children': [{'id': 8, 'Children': [{'id': 7}]}, {'id': 10, 'Children': [{'id': 9}]}]}]
my question: how can I take all children of a special node of this dictionary? for example: all the children of 11 are: (7, 8, 9, 10) what to do?