Python programming in loop

How to write a python program with a while loop that finds the sum of all the digits of an entry (for example, if the entry is 32677, the sum would be 3 + 7 + 7 = 17)