Nicolas, > I would go for something like: > > for char in word: > if char in 'aeiouAEIUO': > char_found = True > break > else: > char_found = False > > It is clear (imo), and it is seems to be the intended idiom for a > search loop, that short-circuits as soon as a match is found.
Thank you - that looks much better that my overly complicated attempts. Are there any reasons why I couldn't simplify your approach as follows? for char in word: if char in 'aeiouAEIUO': return True return False Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list