def sum_digits(s):
    """Assumes s is a string
    Returns the sum of the decimal digits in s
    For example, if s is 'a2b3c' it returns 5"""
    sum = 0
    for c in s:
        try:
            sum += int(c)
        except (TypeError, ValueError):
            continue
    return sum