Python Ascendance and descendance
<p>I apologize in advance for the basic level of my question. I would like to the print the:</p>

<ul>
<li>total number and identity of nodes that have 0 child, 1 child, 2 children, 3 children.</li>
<li>total number of node that have 0 parent, 1 parent, 2 parents, 3 parents.</li>
</ul>

<p>here is my simple script.
thanks.
Vicinci</p>

<pre><code>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)
</code></pre>
