I have a set of unique tuples that looks like the following. The first value is the name, the second value is the ID, and the third value is the type.
('9', '0000022', 'LRA')
('45', '0000016', 'PBM')
('16', '0000048', 'PBL')
('304', '0000042', 'PBL')
('7', '0000014', 'IBL')
('12', '0000051', 'LRA')
('7', '0000014', 'PBL')
('68', '0000002', 'PBM')
('356', '0000049', 'PBL')
('12', '0000051', 'PBL')
('15', '0000015', 'PBL')
('32', '0000046', 'PBL')
('9', '0000022', 'PBL')
('10', '0000007', 'PBM')
('7', '0000014', 'LRA')
('439', '0000005', 'PBL')
('4', '0000029', 'LRA')
('41', '0000064', 'PBL')
('10', '0000007', 'IBL')
('8', '0000006', 'PBL')
('331', '0000040', 'PBL')
('9', '0000022', 'IBL')
This set includes duplicates of the name/ID combination, but they each have a different type. For example:
('9', '0000022', 'LRA')
('9', '0000022', 'PBL')
('9', '0000022', 'IBL')
What I would like to do is process this set of tuples so that I can create a new list where each name/ID combination would only appear once, but include all types. This list should only include the name/ID combos that have more than one type. For example, my output would look like this:
('9', '0000022', 'LRA', 'PBL', 'IBL')
('7', '0000014', 'IBL', 'PBL', 'LRA')
but my output should not include name/ID combos that have only one type:
('45', '0000016', 'PBM')
('16', '0000048', 'PBL')
Any help is appreciated!