Re: break up a value in a list to a list of individual items

2008-11-09 Thread Arnaud Delobelle
r3bol [EMAIL PROTECTED] writes: Hi, sorry to post this, but I've had a really hard time finding how to do it. Q. How can I break up a value in a list to a list of individual items (preferably without importing any modules)? Like... ['12345'] (string) to [1, 2, 3, 4, 5] [numbers] Here's

Re: break up a value in a list to a list of individual items

2008-11-09 Thread Chris Rebert
On Sun, Nov 9, 2008 at 2:38 AM, r3bol [EMAIL PROTECTED] wrote: Hi, sorry to post this, but I've had a really hard time finding how to do it. Q. How can I break up a value in a list to a list of individual items (preferably without importing any modules)? Like... ['12345'] (string) to [1,

Re: break up a value in a list to a list of individual items

2008-11-09 Thread Linas Juskevicius
[int(i) for i in ['12345'][0]] -- http://mail.python.org/mailman/listinfo/python-list

break up a value in a list to a list of individual items

2008-11-09 Thread r3bol
Hi, sorry to post this, but I've had a really hard time finding how to do it. Q. How can I break up a value in a list to a list of individual items (preferably without importing any modules)? Like... ['12345'] (string) to [1, 2, 3, 4, 5] [numbers] Thanks. --

Re: break up a value in a list to a list of individual items

2008-11-09 Thread r3bol
thanks :) and so many different ways! -- http://mail.python.org/mailman/listinfo/python-list

Re: break up a value in a list to a list of individual items

2008-11-09 Thread Terry Reedy
r3bol wrote: Hi, sorry to post this, but I've had a really hard time finding how to do it. Q. How can I break up a value in a list to a list of individual items (preferably without importing any modules)? Like... ['12345'] (string) to [1, 2, 3, 4, 5] [numbers] You did not specify what you want