[Tutor] python question

Kent Johnson kent37 at tds.net
Tue Nov 25 19:47:41 CET 2008

On Tue, Nov 25, 2008 at 12:45 PM, Daniel J Kramer
<constantfables at gmail.com> wrote:
> Hi Kent
> got it!  Is it because Python must recognize the answer as lower case?

It's because you change the user input to lower case, so you have to
compare it against a lower case answer. Maybe this helps:
In [1]: s="Abc"

In [2]: s.lower()
Out[2]: 'abc'

In [3]: s.lower() == "Abc"
Out[3]: False

In [4]: s.lower() == "abc"
Out[4]: True


More information about the Tutor mailing list