Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sum of Digits by wo.tomasz
def sum_digits(num: int) -> int:
n = sum([int(d) for d in (list(str(num)))])
return sum_digits(n) if n > 9 else n
Dec. 21, 2022
Comments: