On Mon, 11 May 2009 14:25:46 +0200 Francesc Alted <[email protected]> wrote: > A Monday 11 May 2009, Nils Wagner escrigué: >> Hi all, >> >> Please consider two strings >> >> >>> line_a >> >> '12345678abcdefgh12345678' >> >> >>> line_b >> >> '12345678 abcdefgh 12345678' >> >> >>> line_b.split() >> >> ['12345678', 'abcdefgh', '12345678'] >> >> Is it possible to split line_a such that the output >> is >> >> ['12345678', 'abcdefgh', '12345678'] > > Mmh, your question is a bit too generic.
Indeed. I would like to split strings made of digits after eight characters each. >>> line_a '111111.1222222.2333333.3' >>> line_b '111111.1 222222.2 333333.3' >>> line_b.split() ['111111.1', '222222.2', '333333.3'] How can I accomplish that ? Nils _______________________________________________ Numpy-discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
