joining 2 lists together - an elegant way?

Rajarshi Guha rajarshi at presidency.com
Fri Jun 28 15:06:33 EDT 2002


On Fri, 28 Jun 2002 15:03:29 -0400, Rajarshi Guha wrote:

> Hi,
>   is there a more elegant way to join to lists together?
> 
> Right now I do:
> 
> newlist = []
> for i in l1:
>   newlist.append(i)
> for i in l2:
>   newlist.append(i)
> 
> It does the job - but a one liner (if possible) would be nice :) TIA,

Sorry :( Found it!



More information about the Python-list mailing list