Hi, my solution is:
from typing import Tuple
def sum_by_types(items: list) -> Tuple[str, int]:
return ''.join([_ for _ in items if isinstance(_, (str))]), sum([_ for _ in items if isinstance(_, (int))])
it passes all asserts including <sum_by_types([]) == ("", 0)>, but solution check result is:
Your result:{"checkiotype_":"tuple","values":["",0]}
Right result:["",0]
Fail:sumbytypes([])
I tried other solutions with same result. Bug? Or my mistake? Using Chrome.
Created at: 2021/11/03 16:59; Updated at: 2021/11/04 10:16
The question is resolved.