"stasz" wrote:
> > hmm, there's lots of ways, huh? you can use itertools.zip instead of
> > builtin zip, or do:
> >
> > map(None, list1, list2)
>
> Not!
huh?
> One should try a possible solution first,
> >>> l1 = range(10)
> >>> l2 = range(10,20)
> >>> l1
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> >>>
On Tue, 10 May 2005 18:11:27 -0700, gene.tani wrote:
> hmm, there's lots of ways, huh? you can use itertools.zip instead of
> builtin zip, or do:
>
> map(None, list1, list2)
Not!
One should try a possible solution first,
>>> l1 = range(10)
>>> l2 = range(10,20)
>>> l1
[0, 1, 2, 3, 4, 5, 6, 7, 8
For efficient string concatenation in python look at:
http://www.skymind.com/~ocrow/python_string
--
http://mail.python.org/mailman/listinfo/python-list
hmm, there's lots of ways, huh? you can use itertools.zip instead of
builtin zip, or do:
map(None, list1, list2)
, which will pad the shorter one to match the longer one.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> If I simplify the problem, suppose I have 2 lists like:
>
> a = range(10)
> b = range(20,30)
>
> What I would like to have, is a "union" of the 2 list in a
> single tuple. In other words (Python words...):
>
> c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, .
If the
[EMAIL PROTECTED] wrote:
> If I simplify the problem, suppose I have 2 lists like:
>
> a = range(10)
> b = range(20,30)
>
> What I would like to have, is a "union" of the 2 list in a single tuple. In
> other words (Python words...):
>
> c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, .
py> a
andrea.gavana wrote:
> If I simplify the problem, suppose I have 2 lists like:
>
> a = range(10)
> b = range(20,30)
>
> What I would like to have, is a "union" of the 2 list in a single tuple. In
> other words (Python words...):
>
> c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, .
The 'yiel
[EMAIL PROTECTED] wrote:
> If I simplify the problem, suppose I have 2 lists like:
>
> a = range(10)
> b = range(20,30)
>
> What I would like to have, is a "union" of the 2 list in a single tuple. In
> other words (Python words...):
>
> c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, .
>
> and
On 5/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello NG,
>
> it is probably a beginner question, but I didn't solve it without
> for-loops, and I am unable to determine if there is a faster way (probably
> using some built-in function) to do this task. I have to speed up a
> wxPy