Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can see why you might think so, but remember the Zen of Python is to have only one obvious way to do something.

    >>> [1,2,3] + [4,5]
    [1, 2, 3, 4, 5]
Thus appending should do something different than addition.

    >>> x = [1,2,3]
    >>> x.append([4,5])
    >>> x
    [1, 2, 3, [4, 5]]


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: