Rance Hall wrote:

> I have a user entered variable that I need to check to see if they
> entered one of the two legal values.
> 
> But I only need to check this if one other fact is true.
> 
> 
> we have a variable called "mode"  whose value is either "add" or
> "edit" based on how we where called.
> 
> we have a userentry variable tied to an imput function.
> 
> My current if statement looks like this:
> 
>             if ((userentry.lower != "c" or userentry.lower != "i") and
> mode == "add"):

Hint:

>>> userentry = "YADDA"
>>> userentry.lower
<built-in method lower of str object at 0x7f94961f5ba0>
>>> userentry.lower()
'yadda'


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to