(newbie)list conversion problem

Boris Genz boris_genz at hotmail.com
Thu Jun 19 12:42:25 EDT 2003


On Thu, 19 Jun 2003 15:30:46 +0200, Gerrit Holl wrote:

> group = [int(elem) for elem in x]
> group = map(int, x)
> 
> 
Thanks Gerrit, this one works perfectly;) Thanks everyone. I knew there
was something about that loop, I tried to put group = [] out of the loop,
but because the previous list was created with re.split statement, loop
created the list for every number plus next number in the list so the
final number of the lists was equal to the number of numbers (It's hard to
explain, but it's important to note that I didn't get what I needed:) But
everything works now...

>> P.S. My English is poor but I hope you understand me;)
> 
> I understand you perfectly - assumed I have answered your question ;)

Well it's nice to hear that;) Thanks again, Boris




More information about the Python-list mailing list