python recursively print list