I want to create a N-ary tree in which each node will contain a key(name) and a value.
1 root then N children with two fields = name and associate value and again each children have N-children with 2 fields.
looking for simpler approach without using class using only dictionary and lists (if possible??).
class Node():
#Do something
# ....
{'name': ..., 'value': ..., 'children': [...]}? - jonrsharpenode['children']. - jonrsharpe'children'will contain references to the other nodes that look the same way. It is quite normal for the tree that you can go only to the children. You have to remember the upper node somewhere else if you want to go back. - pepr