splitting delimited strings
nicola-mingotti at libero.it
Thu Jun 16 03:28:58 CEST 2005
On Wed, 15 Jun 2005 23:03:55 +0000, Mark Harrison wrote:
> What's the most efficient way to process this? Failing all
> else I will split the string into characters and use a FSM,
> but it seems that's not very pythonesqe.
like this ?
>>> s = "@hello at world@@foo at bar"
['', 'hello', 'world', '', 'foo', 'bar']
>>> s2 = "hello at world@@foo at bar"
'hello at world@@foo at bar'
['hello', 'world', '', 'foo', 'bar']
More information about the Python-list