logoalt Hacker News

esttoday at 9:56 AM1 replyview on HN

I think py version can be shortened as:

from collections import Counter

stats = Counter(x.strip() for l in open(sys.argv[1]) for x in l)


Replies

voidUpdatetoday at 10:13 AM

Would that decrease memory usage though?

show 1 reply