On Tue, Sep 28, 2010 at 3:03 PM, Corey Richardson <kb1...@aim.com> wrote:
>  Hello tutors.
>
> I hate doing this:
>            string = string.lower()
>
> Is there a way to do it without the "string =" part? Thanks.
>

I suppose the best answer is it depends on what you are doing with
string after you do string.lower()

you can use the string.lower() directly in IF statements and such without worry


a = "TEST"

if a.lower() == "test":
   do stuff

works for me.even on the new 3.1
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to