3 ms·
I think HackerNews (and similar sites) would greatly benefit from having submissions grouped by a moderator. Don't display all submissions about NSA or Steve J
by b0rsuk 13y ago
I think HackerNews (and similar sites) would greatly benefit from having submissions grouped by a moderator. Don't display all submissions about NSA or Steve Jobs as separate lines. Display them as a thread, with some general information like "6 submissions, tags: Steve Jobs is still dead, average karma: 703"
from itertools import groupby
better_hn = sorted(hn, key=topic)
better_hn = [topic, len(list(submissions))
for topic, submissions in groupby(better_hn)]
for line in better_hn:
print(line)