How can I do case insensitive string comparison in Python?
I would like to encapsulate comparison of a regular strings to a repository string using in a very simple
The usual approach is to uppercase the strings or lower case them for the lookups and comparisons. For example:
>>> "hello".upper() == "HELLO".upper() True >>>