On Sat, Jun 22, 2013 at 8:49 PM, Gene Heskett <ghesk...@wdtv.com> wrote: > On Saturday 22 June 2013 22:46:51 christheco...@gmail.com did opine: > >> Writing simple program asking a question with the answer being >> "yes"...how do I allow the correct answer if user types Yes, yes, or >> YES? >> >> Thanks > > AND each character coming in from the keyboard with $DF before adding it to > the comparison buffer. Makes it all uppercase. Then compare it to the > uppercase YES.
It's not working for me. >>> ''.join(chr(ord(c) & 0xdf) for c in 'ναί') == 'ΝΑΊ' False >>> ''.join(chr(ord(c) & 0xdf) for c in 'ναί') '\x9d\x91\x8f' -- http://mail.python.org/mailman/listinfo/python-list