I am confused as i don't see where i am wrong. I have collected the integer and turned it into a string and then I am picking out each digit one by one, turning them back into integers and i am appending it to a list and then finally i am printing the sum of that list. Instead the code returns 'none' and this message comes up: 'Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11.' Please help. Here is my code:

Thanks for the help

```
n=int(input('input a number'))
def digit_sum(n):
n=str(n)
for i in range(len(n)):
x=0
z=[]
a=n[x]
y=int(a)
z.append(y)
x=x+1
print(sum(z))
```