Neatest way to do a case insensitive "in"?

Jervis Whitley jervisau at gmail.com
Thu Mar 19 16:25:27 EDT 2009


>
>    if stringA.lower() in stringB.lower():
>        bla bla bla
>

    from string import lower

    if lower(stringA) in lower(stringB):
         # was this what you were after?

Cheers,

Jervis



More information about the Python-list mailing list