Btw, Python has nifty multiple assignment, so you can write the swap simply as:
root.left, root.right = (self.invertTree(root.right),
self.invertTree(root.left))
(Parentheses added to break over two lines.)