i have this list of dicts:
list1 = [
{'id': 1, 'fop': 192, 'fop_plan': 'capo', 'fup_comments': None},
{'id': 1, 'fop': 222, 'fop_plan': 'groso', 'fup_comments': None},
{'id': 2, 'fop': 222, 'fop_plan': 'bien', 'fup_comments': None},
{'id': 2, 'fop': 222, 'fop_plan': 'bien', 'fup_comments': None},
{'id': 3, 'fop': 223, 'fop_plan': 'bien', 'fup_comments': None}
]
and i want to get this:
list2 = [
{'id': 1, 'fop': [192, 222] 'fop_plan': ['capo', 'groso'], 'fup_comments': [None, None]},
{'id': 2, 'fop': [222, 222], 'fop_plan': ['bien', 'bien'], 'fup_comments': [None, None]},
{'id': 3, 'fop': 223, 'fop_plan': 'bien', 'fup_comments': None}
]