[Numpy-discussion] String manipulation

Nils Wagner nwagner at iam.uni-stuttgart.de
Mon May 11 08:03:45 EDT 2009


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']

Nils

  



More information about the NumPy-Discussion mailing list