@@ -0,0 +1,1156 @@
+# Definition for a binary tree node.%0A# class TreeNode(object):%0A#     def __init__(self, x):%0A#         self.val = x%0A#         self.left = None%0A#         self.right = None%0A%0Aclass Codec:%0A%0A    def serialize(self, root):%0A        %22%22%22Encodes a tree to a single string.%0A        :type root: TreeNode%0A        :rtype: str%0A        %22%22%22%0A        ans = %5B%5D%0A        if root:%0A            ans.append(str(root.val))%0A            ans.append(self.serialize(root.left))%0A            ans.append(self.serialize(root.right))%0A        return ' '.join(ans)%0A%0A    def deserialize(self, data):%0A        %22%22%22Decodes your encoded data to tree.%0A        :type data: str%0A        :rtype: TreeNode%0A        %22%22%22%0A        return self.do_deserialize(data)%5B0%5D%0A%0A    def do_deserialize(self, data):%0A        ans = None%0A        if data:%0A            val, data = data.split(' ', 1)%0A            if val:%0A                ans = TreeNode(int(val))%0A                ans.left, data = self.do_deserialize(data)%0A                ans.right, data = self.do_deserialize(data)%0A        return ans, data%0A%0A%0A%0A# Your Codec object will be instantiated and called as such:%0A# codec = Codec()%0A# codec.deserialize(codec.serialize(root))%0A

Add py solution for 449. Serialize and Deserialize BST