I have a datafile which is parsed by an external library, I'm having
trouble creating a hierarchical structure of the data.
This is what I got so far:
items = get_items() # returns a generator
for item in items:
print(item)
children = get_children(item) # also returns a generator
for child in children:
print("--", child)
This is fine as it will get the children for each parent item. I can't seem
to figure out how to go further and get the chidren of the children and so
on.
Thanks.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor