"Kent Johnson" <[EMAIL PROTECTED]> wrote

> One regex can split apart a numeric part and a non-numeric unit:

> In [24]: splitter.findall('2m 4cm 3mm')
> Out[24]: [('2', 'm'), ('4', 'cm'), ('3', 'mm')]

As ever Kent, a neat solution. Much more efficient than 
my 3 way search and relatively easy to split the list 
apart  for analysis. 

Even the regex is cleaner! :-)

Alan G.

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to