Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sum by Type by Cyrus490
from typing import Tuple
def sum_by_types(items: list) -> Tuple[str, int]:
return ("".join([i for i in items if isinstance(i, str)]), sum([i for i in items if isinstance(i, int)]))
Aug. 11, 2020