consistency: extending arrays vs. multiplication ?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Jul 23 17:35:39 EDT 2005


In <mailman.2115.1122136234.10512.python-list at python.org>, Soeren
Sonnenburg wrote:

> Just having started with python, I feel that simple array operations '*'
> and '+' don't do multiplication/addition but instead extend/join an
> array:
> 
> a=[1,2,3]
>>>> b=[4,5,6]
>>>> a+b
> [1, 2, 3, 4, 5, 6]

Both operate on the lists themselves and not on their contents.  Quite
consistent if you ask me.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list