Comment Comment by badjeans Hardly shorter than just writing the for loop, i.e. the example in python groupByAge = collections.defaultdict(list) for person in people: groupByAge[person["age"]].append(person) parent badjeans 4 years ago