if i just read my sum_digits function here, it makes sense in my head but it seems to be producing wrong results. Any tip?
sum_digits
def is_a_digit(s): \
Just a variation to @oscar's answer, if we need the sum to be single digit,
def sum_digits(digit): s = sum(int(x) for x in str(digit) if x.isdigit()) if len(str(s)) > 1: return sum_digits(s) else: return s