have the following: >>> x [['NM100', 1, 2], ['NM100', 3, 4], ['NM200', 5, 6]] >>> for i in x: ... print i ... ['NM100', 1, 2] ['NM100', 3, 4] ['NM200', 5, 6] ------ how does one obtain list z such that z = [['NM100',1,2,3,4],['NM200',5,6]]