Comment by est
12 hours ago
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)
12 hours ago
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)
Would that decrease memory usage though?
see https://news.ycombinator.com/item?id=47543756