Neatest way to do a case insensitive "in"?

Tino Wildenhain tino at wildenhain.de
Sat Mar 14 10:40:26 EDT 2009


tinnews at isbd.co.uk wrote:
...
>>> But I was wondering if there's a neater/easier way?
>> How is "if stringA.lower() in stringB.lower():" complex/messy?
>>
> Well I guess I was just looking for "incase" a bit like "strcasecmp"
> in C.

Which locales case folding do you want to have applied?

Tino

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090314/03b1ca35/attachment-0001.bin>


More information about the Python-list mailing list