3 ms·
Why? You would just get a new list back.
by Paradigma11 12y ago
Why?
You would just get a new list back.
- msellout 12y agoI 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]]