[Baypiggies] (corrected) partial flattening of list

Vikram kpguy at rediffmail.com
Tue Jul 27 12:48:28 CEST 2010


Given:

l = [['NM100', 1, 3], ['NM100', 7, 10], ['NM200', 13, 16]]

want something like:
z = [['NM100',[1,2,3,7,8,9,10]],['NM200',[13,14,15,16]]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20100727/4cb8552a/attachment.html>


More information about the Baypiggies mailing list