python programming help

Chris Angelico rosuav at gmail.com
Sun Dec 8 14:17:03 EST 2013


On Mon, Dec 9, 2013 at 6:06 AM,  <rafaellasav at gmail.com> wrote:
> but when i wrote these lines it returns me an error
> Traceback (most recent call last):
>   File "/Users/rafaellasavva/Desktop/people.py", line 19, in <module>
>     print 'Dan' in people(18) and 'Cathy' in people(18)
> TypeError: argument of type 'NoneType' is not utterable
>
> do you know what it might be wrong?

Hehe. The first thing that's wrong is that you're retyping the error
instead of copying and pasting it. The problem is actually that it's
not *iterable* here. And the reason for that is that you're printing
the result instead of returning it, as has been mentioned by a few
people.

Also, your posts are acquiring the slimy stain of Google Groups, which
makes them rather distasteful. All your replies are getting
double-spaced, among other problems. Please consider switching to an
alternative newsgroup reader, or subscribing to the mailing list:

https://mail.python.org/mailman/listinfo/python-list

The content is the same, but it comes by email instead of netnews.

ChrisA



More information about the Python-list mailing list