title: Number of Leaves in a Binary Tree Python
body: <p>I have a data structure that looks like this Q = (A,(B,C)). Len(Q) obviously equals 2. But I only care about the leaves (A, B, C). What's a function I can use that will return function(Q) = 3?</p>