Lawrence D'Oliveiro wrote: > In message <o0tot492cfjj2g180p15irievp6crpc...@4ax.com>, Gilles Ganault > wrote: > >> test = "t...@gmail.com" >> isp = ["gmail.com", "yahoo.com"] >> for item in isp: >> if test.find(item): >> print item >> ======= output >> gmail.com >> yahoo.com >> ======= > > This is why conditional constructs should not accept any values other than > True and False.
So you think if test.find(item) == True: ... would have been better? -- http://mail.python.org/mailman/listinfo/python-list