Rant (was Re: x*x if x>10
ssecorp
circularfunc at gmail.com
Sun Jul 27 11:26:14 EDT 2008
I might be misunderstanding OP but:
a+b+c+d+e is simple way of concatenating 5 lists...
as a function that takes any amount of lists and concatenates them:
def concat(*args):
c = []
for elem in args:
c += elem
return c
don't know if extend is faster or slower or the same as + :
def concat(*args):
c = []
for elem in args:
c.extend(elem)
return c
I don't know of a built-in.
More information about the Python-list
mailing list