Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Neutraldict Reloaded solution in Creative category for Sum by Type by veky
def sum_by_types(a):
acc = type('', (dict,), dict(__missing__=staticmethod(type.__call__)))()
for elem in a: acc[type(elem)] += elem
return acc[str], acc[int]
Sept. 20, 2021
Comments: