A Faster Way...

andrea.gavana at agip.it andrea.gavana at agip.it
Tue May 10 12:53:30 EDT 2005


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
wxPython code that uses a lot of string concatenation (and uses these
strings to build some Fancy StaticText Controls). I found a way, but I need
a little bit of help from you, NG.

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 so on.

Sorry if it seems an homework assignment.

Thanks to you all.

Andrea
------------------------------------------------------------------------------------------------------------------------------------------
 Message for the recipient only, if received in error, please notify the
sender and read http://www.eni.it/disclaimer/





More information about the Python-list mailing list