Is there any way to say ignore case with "in"?

Torsten Bronger bronger at
Fri Apr 4 23:08:11 CEST 2008


tinnews at writes:

> Is there any way in python to say
>     if string1 in string2:
>         <do something>
> ignoring the case of string1 and string2? 

You can "normalise" both first, i.e. converting to lower case.


Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at
               (See for further contact info.)

More information about the Python-list mailing list