[Numpy-discussion] String manipulation

Nils Wagner nwagner@iam.uni-stuttgart...
Mon May 11 07:03:45 CDT 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