I've been learing python from http://www.learnpython.org/page/Functions and in the functions lesson I've got stuck on the exercise for 2 days now.
As far as I can tell my code should work but when i run it, it returns TypeError: 'NoneType' object is not iterable. Can anyone explain why?
My code is:
Thanks Barry1.4
As far as I can tell my code should work but when i run it, it returns TypeError: 'NoneType' object is not iterable. Can anyone explain why?
My code is:
Code:
def list_benefits(): print 'More organized code', 'More readable code' , 'Easier code reuse' 'Allowing programmers to share and connect code together' def build_sentence(info): return '%s' % list_benefits + ' is a benefit of functions' def name_the_benefits_of_functions(): list_of_benefits = list_benefits() for benefit in list_of_benefits: print build_sentence(benefit) name_the_benefits_of_functions()
Comment