Python: group list items in a dict,"res.setdefault(item['a'], []).append(item)"