Travis build: 910
This commit is contained in:
@ -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
|
||||
Reference in New Issue
Block a user