Python Recursive Function Append In Python