Re: map/filter/reduce/lambda opinions and background unscientific mini-survey
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

From: Sion Arrowsmith <siona@chiark.greenend.org.uk>
Date: Thu Jul 07 2005 - 17:50:04 CEST

=?ISO-8859-2?Q?Pawe=B3?= Sakowski <pawel@sakowski.pl> wrote:
>>>> ll=[[1,2],[3,4,5],[6]]
>>>> sum(ll,[])
>[1, 2, 3, 4, 5, 6]

That's a great argument for list.__add__ having the semantics of
extend rather than append 8-)

-- 
\S -- siona@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
Received on Thu Sep 29 16:48:58 2005