Kent Johnson <kent37 <at> tds.net> writes: > In [39]: rr = [ ','.join(t for t in i if t!='-') for i in zip(*( > i.split() for i in p.findall(s) )) ] > > In [40]: rr > Out[40]: > ['RA7,OSC1,CLKI', > 'RA6,OSC2,CLKO', > 'RA5,AN4,nSS1,LVDIN,RCV,RP2', > '', > 'RA3,AN3,VREF_PLUS,C1INB', > 'RA2,AN2,VREF_MINUS,CVREF_MINUS,C2INB', > 'RA1,AN1,C2INA,PMPA7,RP1', > 'RA0,AN0,C1INA,PMPA6,RP0'] > > Kent
Wow, really impressed with the reply's so far. Have compiled them all, and much to learn from each point of view. No 'one liners' for me (at the moment) though......haha:-). Seeing the Python functions, library's, syntax etc. on a real problem isinspirational to me. Much to learn and digest. With some additional conditions, Python will let me slice through the target 68k text file in no time. Thanks to all. Any future posts will be given due consideration, thanks in advance. Kent (yes, there is another one) _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor