This was my original code:

```
def over_nine_thousand(lst):
sum = 0
if len(lst) == 0:
return sum
else:
for i in lst:
sum += i
if sum > 9000:
return sum
elif lst.index(i) == -1:
print(lst.index(i))
return sum
print(over_nine_thousand([8000, 900]))
```

and it was outputting “None”

However changing the return statements to breaks instead fixed it:

```
def over_nine_thousand(lst):
sum = 0
if len(lst) == 0:
return sum
else:
for i in lst:
sum += i
if sum > 9000:
break
elif lst.index(i) == -1:
print(lst.index(i))
break
return sum
print(over_nine_thousand([8000, 900]))
```

I’m confused mainly because of 2 reasons: why was my original codes result “None”? and I thought that return would both and the loop and the function when it was reached, is that assumption wrong?

Thanks!