Bart Willems wrote:
> ...
> I always try to stay away from 'negative' operators if possible, to
> improve readability:
>
> while True:
> hint = raw_input('\nAre you stuck? y/n: ').lower()
> if hint = 'y' or hint = 'n':
> break
> else:
> print 'Please answer yes or no'
And if you really want to see what is going wrong, replace that last by:
print 'Please answer yes or no (not %r):' % hint
--
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
