def bin_tree_to_list(root):
if not root:<EOL><INDENT>return root<EOL><DEDENT>root = bin_tree_to_list_util(root)<EOL>while root.left:<EOL><INDENT>root = root.left<EOL><DEDENT>return root<EOL>
type root: root class