Function to get the count of full Nodes in a binary tree
def getfullCount ( root ) : NEW_LINE INDENT if ( root == None ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT res = 0 NEW_LINE if ( root . left and root . right ) : NEW_LINE INDENT res += 1 NEW_LINE DEDENT res += ( getfullCount ( root . left ) + getfullCount ( root . right ) ) NEW_LINE return res NEW_LINE DEDENT