I would like to determine the size of a tree by number of vertices.
Clearly,
len(list(PreOrderIter(root)))
gives me this number.
Is this the way to do it?
In other words, is there a recommended dedicated function or something for this in anytree
?
Can the above be possibly more efficient somehow?