Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Lazy solution in Clear category for Sum by Type by carel.anthonissen
from typing import Tuple
def sum_by_types(items: list) -> Tuple[str, int]:
return (''.join((item for item in items if isinstance(item,str))),
sum((item for item in items if isinstance(item,int))))
May 7, 2020