Peter Otten a écrit : > Bruno Desthuilliers wrote: > >> and simplified again thanks to Python 'in' operator: >> while not usrinp.lower() in "yn": > > But note that 'in' performs a substring search and therefore "yn" and "" > would be accepted as valid answers, too.
Mmm, right. Thanks for the correction. => while not usrinp.lower() in ['y', 'n']: -- http://mail.python.org/mailman/listinfo/python-list