About 322,000 results
Open links in new tab
  1. python - How do I do a case-insensitive string comparison

    How can I compare strings in a case insensitive way in Python? I would like to encapsulate comparison of a regular strings to a repository string, using simple and Pythonic code.

  2. Ignore case in Python strings - Stack Overflow

    Sep 15, 2008 · What is the easiest way to compare strings in Python, ignoring case? Of course one can do (str1.lower() <= str2.lower()), etc., but this created two additional temporary …

  3. python - How to match a substring in a string, ignoring case

    I'm looking for ignore case string comparison in Python. I tried with: if line.find('mandy') >= 0: but no success for ignore case. I need to find a set of words in a given text file. I am read...

  4. Python - Ignore letter case - Stack Overflow

    Feb 24, 2016 · Python - Ignore letter case Asked 9 years, 10 months ago Modified 9 years, 9 months ago Viewed 75k times

  5. python - Case insensitive regular expression without re.compile ...

    In Python, I can compile a regular expression to be case-insensitive using re.compile:

  6. python - Ignore case in string comparison - Stack Overflow

    If I have two variables, a and b and they could be integers, float, or strings. I want to return True if they are equal (in case of string, ignore case). As Pythonic as possible.

  7. python - Case insensitive 'in' - Stack Overflow

    Unfortunately this loses all the standard list features, like sort, insert, pop, etc. You could subclass list but that doesn't help doing compares in other places. What if you need a dict instead of a …

  8. python - case-insensitive list sorting, without lowercasing the …

    Apr 22, 2012 · 1 Case-insensitive sort, sorting the string in place, in Python 2 OR 3 (tested in Python 2.7.17 and Python 3.6.9):

  9. python - pandas "case insensitive" in a string or "case ignore"

    Jun 25, 2018 · pandas "case insensitive" in a string or "case ignore" Asked 7 years, 6 months ago Modified 1 year, 5 months ago Viewed 64k times

  10. python - Case insensitive replace - Stack Overflow

    May 28, 2009 · What's the easiest way to do a case-insensitive string replacement in Python?