Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Put it in neutral! solution in Clear category for Sum by Type by veky
def sum_by_types(a: list) -> (str, int):
accum = {T: T() for T in (str, int)}
for elem in a: accum[type(elem)] += elem
return tuple(accum.values())
March 2, 2020
Comments: