i did what gathered to be the right answer but it returns that i have an indentation error

I don't fully understand how to do this problem without help of the forum i feel it should be correct but could be missing a simple part

```
def digit_sum(n):
n = str(num)
l = len(n)
number = 0
while l < 0:
for digit in n:
number += digit
return number
```