Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49179
| References | <195f7100-c4bf-414d-a92f-5b8a70d896f7@googlegroups.com> <201306222249.33354.gheskett@wdtv.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2013-06-25 13:05 -0600 |
| Subject | Re: newbie question |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3842.1372187160.3114.python-list@python.org> (permalink) |
On Sat, Jun 22, 2013 at 8:49 PM, Gene Heskett <gheskett@wdtv.com> wrote: > On Saturday 22 June 2013 22:46:51 christhecomic@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'
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
newbie question christhecomic@gmail.com - 2013-06-22 19:39 -0700 Re: newbie question Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-22 19:50 -0700 Re: newbie question Chris Angelico <rosuav@gmail.com> - 2013-06-23 12:48 +1000 Re: newbie question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-23 03:08 +0000 Re: newbie question Gene Heskett <gheskett@wdtv.com> - 2013-06-22 22:49 -0400 Re: newbie question Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-25 13:05 -0600 Re: newbie question Tim Rowe <digitig@gmail.com> - 2013-06-25 20:26 +0100
csiph-web