15 ms·
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)
by est 7mo 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)
- voidUpdate 7mo agoWould that decrease memory usage though?
- est 7mo agosee https://news.ycombinator.com/item?id=47543756 https://news.ycombinator.com/item?id=47543756