Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
comprehensions solution in Clear category for Sum by Type by MBM_1607
from typing import Tuple
def sum_by_types(items: list) -> Tuple[str, int]:
return ''.join([x for x in items if type(x) == str]), sum([x for x in items if type(x) == int])
March 20, 2020
Comments: