newbie question

Tim Rowe digitig at gmail.com
Tue Jun 25 15:26:26 EDT 2013


On 23 June 2013 03:49, Gene Heskett <gheskett at wdtv.com> wrote:

> On Saturday 22 June 2013 22:46:51 christhecomic at 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.
>
> Cheers, Gene
>

Hello, the 1970s called and want their hairstyles back! That is *terrible*
practice in a modern high-level language. Use the library functions. They
will take proper account of the character set being used (which you
shouldn't even have to know for a task like this, let alone make unsafe
assumptions about).

-- 
Tim Rowe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130625/4adaa6bb/attachment.html>


More information about the Python-list mailing list