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

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton