Python one line
\nclass Solution(object):\n    def preorderTraversal(self, root):\n        """\n        :type root: TreeNode\n        :rtype: List[int]\n        """\n\n        
```\nclass Solution(object):\n    def preorderTraversal(self, root):\n        """\n        :type root: TreeNode\n        :rtype: List[int]\n        """\n\n        return [root.val]+ self.preorderTraversal(root.left) + self.preorderTraversal(root.right) if root else []\n```
[]