Hello, I apologize in advance for the basic level of my question. I would like to the print the:
- total number and identity of nodes that have 0 child, 1 child, 2 children, 3 children.
- total number of node that have 0 parent, 1 parent, 2 parents, 3 parents.
here is my simple script. thanks. Vicinci
search = []
search += search_nodes()
node_father = []
node_child = []
for i in search:
node_father += i.get_parents()
node_child += i.get_children()
print "Total of nodes", len(search)
print "Total of parents", len(node_father)
print "Total of children", len(node_child)