In message <[email protected]>, Peter Otten wrote: > Lawrence D'Oliveiro wrote: > >> In message <[email protected]>, Gilles Ganault >> wrote: >> >>> test = "[email protected]" >>> 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?
That won't work either. Can anyone tell us what he's done wrong? -- http://mail.python.org/mailman/listinfo/python-list
