I found something that doesn\'t make sense to me. I am hoping that someone can explain it.
def test(word): total = 0 for l in word: print l
I am 100% sure that return total in the second function is on the same level (indented exactly) as print. Probably you use mixed space characters (tab or space).
return total
print