I'm getting correct output but still getting error message:

Your function fails on digit_sum(6). It returns 0 when it should return 6.

```
def digit_sum(n): #n is a number input
counter = (len(str(n))-1) #convrt 2 str, get(len - 1), used as counter and index
tempList = [] #variable = list... to contain extracted digit
for i in range(counter):
while counter != -1: # while NOT TRUE/FALSE will execute
n = str(n) #convert int to string
digit = n[counter] #using "counter" as index, "digit" to store value
tempList.append(int(digit)) #convert to int, append to list
counter -= 1
return sum(tempList) # sum(v), v needs to be int type
print digit_sum(12345)
```