def digit_sum(n):
    while n > 9:
        n = sum(int(d) for d in str(n))
return n
[digit_sum(n) for n in [1, 3, 999, 10, 234, 1234132341]]
converting two digit integer into single digit inside a python list?