Splitting a string

Thomas Heller theller at ctypes.org
Fri Apr 2 12:12:22 CEST 2010

Maybe I'm just lazy, but what is the fastest way to convert a string
into a tuple containing character sequences and integer numbers, like this:

'si_pos_99_rep_1_0.ita'  -> ('si_pos_', 99, '_rep_', 1, '_', 0, '.ita')

Thanks for ideas,

More information about the Python-list mailing list