Generate code to implement a pre-order tree traversal in Python.
Not applicable
def preOrderTraversal(root):
 if root is None:
 return

 print(root.data)
 preOrderTraversal(root.left)
 preOrderTraversal(root.right)