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