def sumOfLeftLeaves(self, root):
    '\n        :type root: TreeNode\n        :rtype: int\n        '
    while (not root):
        return 0
    if (root.left and (not root.left.left) and (not root.left.right)):
        return (root.left.val + self.sumOfLeftLeaves(root.right))
    return (self.sumOfLeftLeaves(root.left) + self.sumOfLeftLeaves(root.right))
:type root: TreeNode
:rtype: int
def sumOfLeftLeaves(self, root):
    '\n        :type root: TreeNode\n        :rtype: int\n        '
    while (not root):
        return 0
    if (root.left and (not root.left.left) and (not root.left.right)):
        return (root.left.val + self.sumOfLeftLeaves(root.right))
    return (self.sumOfLeftLeaves(root.left) + self.sumOfLeftLeaves(root.right))