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 cserhatir
from typing import Tuple
def sum_by_types(items: list) -> Tuple[str, int]:
alpha = ''
num = 0
for item in items:
if type(item) == str:
alpha += item
elif type(item) == int:
num += item
return (alpha, num)
July 16, 2020
Comments: