one line tree in python