On Mon, Oct 13, 2014 at 7:31 PM, Gelonida N <gelon...@gmail.com> wrote: > Taking into account the Steven's suggestion about using the 'in' expression > it could be: > > > while True: > ans = input('Do you like python?') > if ans.lower() in ('yes', 'y'): > break
Or, even simpler: Use an active condition. while input('Do you like python?') not in ('yes', 'y'): pass ChrisA -- https://mail.python.org/mailman/listinfo/python-list