Binary Tree Construction In Python