Travis build: 910

This commit is contained in:
Rohit Tanwar
2018-02-22 15:54:31 +00:00
parent 8e86b83e9a
commit 601344b68a
5 changed files with 480 additions and 434 deletions

View File

@ -1,6 +1,6 @@
def count_by(arr, fn=lambda x: x):
key = {}
for el in map(fn, arr):
key[el] = 0 if not el in key else key[el]
key[el] = 0 if el not in key else key[el]
key[el] += 1
return key