###226. Invert Binary Tree

题目:
<https://leetcode.com/problems/invert-binary-tree/>


难度:

Easy

然后查了一下，有更简单的写法


```

class Solution(object):
    def invertTree(self, root):
        """
        :type root: TreeNode
        :rtype: TreeNode
        """
        if root == None: return None
        elif root.left == None and root.right == None: return root
        else:
            leftNode = root.left
            rightNode = root.right
            root.right = leftNode
            root.left = rightNode
            self.invertTree(root.left)
            self.invertTree(root.right)
            return root
```

