On 5/11/2009 8:03 AM Nils Wagner apparently wrote: >>>> line_a > '12345678abcdefgh12345678' > Is it possible to split line_a such that the output > is > > ['12345678', 'abcdefgh', '12345678']
More of a comp.lang.python question, I think:
out = list()
for k, g in groupby('123abc456',lambda x: x.isalpha()): out.append( ''.join(g) )
fwiw,
Alan Isaac
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion
