Can anyone tell me where i did wrong ?

I did define digit_sum in the first line.

Here's the error msg:

"Oops, try again. Did you create a function called digit_sum? Your code threw a "local variable 'l' referenced before assignment" error.>"

```
def digit_sum(n):
digit = 0
lis = []
while n!= 0:
digit = n % 10
lis.append(digit)
n = n // 10
print lis
for i in lis:
l += i
return l
```