Parsing numeric ranges

Seldon seldon at katamail.it
Fri Feb 25 10:27:08 CET 2011


Hi all,
I have to convert integer ranges expressed in a popular "compact" 
notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 
2,5,7,20,21,22,41).

Is there any library for doing such kind of things or I have to write it 
from scratch ?

Thanks in advance for any answers.

Seldon





More information about the Python-list mailing list