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>