On Wed, 08 Apr 2009 12:11:55 +0200, Ulrich Eckhardt
<eckha...@satorlaser.com> wrote:
>find() returns the index where it is found or -1 if it is not found. Both an
>index>0 or a -1 evaluate to True when used as conditional expression.

Thanks everyone. I shouldn't have assumed that "if test.find(item):"
was necessarily enough to mean True.

for item in isp:
        #GOOD if item in test:
        if test.find(item) > 0:
                print test
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to