If you don’t want to use str.lower()
, you can use a regular expression:
import re
if re.search('mandy', 'Mandy Pande', re.IGNORECASE):
# Is True
Related Contents:
- C, Perl, and Python similar loops different results
- How can I remove text within parentheses with a regex?
- How to efficiently calculate a running standard deviation
- Scraping dynamic content in a website [duplicate]
- What are the differences between Perl, Python, AWK and sed? [closed]
- Extracting data from HTML table
- Character Translation using Python (like the tr command)
- Are dictionaries ordered in Python 3.6+?
- Is there a difference between “==” and “is”?
- How to delete a specific line in a file?
- how to play wav file in python?
- return statement in for loops
- Possible to get user input without inserting a new line?
- Pygame collision with masks
- Is it worth using Python’s re.compile?
- Can you explain closures (as they relate to Python)?
- Creating Threads in python
- Python/NumPy first occurrence of subarray
- Flask to return image stored in database
- Can Python pickle lambda functions?
- Wrapping a C library in Python: C, Cython or ctypes?
- Range values to pseudocolor
- negative zero in python
- Reading Excel File using Python, how do I get the values of a specific column with indicated column name?
- PermissionError: [WinError 32] The process cannot access the file because it is being used by another process
- Split a list into nested lists on a value
- Pandas Groupby and Sum Only One Column
- redirect while passing arguments
- Pyspark: explode json in column to multiple columns
- When to use sys.path.append and when modifying %PYTHONPATH% is enough
- How to hold a ‘key down’ in Pygame?
- numpy is already installed with Anaconda but I get an ImportError (DLL load failed: The specified module could not be found)
- Python CSV to SQLite
- Difference Between Two Lists with Duplicates in Python
- Pandas data precision [duplicate]
- Check if string matches pattern
- Named tuple and default values for optional keyword arguments
- How do I remove the background from this kind of image?
- Efficiently Calculating a Euclidean Distance Matrix Using Numpy
- Convert list into a pandas data frame
- Prevent pandas read_csv treating first row as header of column names
- Difference between using commas, concatenation, and string formatters in Python
- Python: Why should ‘from import *’ be prohibited?
- Why am I getting httplib.BadStatusLine in python?
- What is the difference between calling function with parentheses and without in python? [duplicate]
- WebDriverException: Message: Service /content/chromedriver unexpectedly exited. Status code was: -6 with ChromeDriver Google Colab and Selenium
- Python: How do I make a subclass from a superclass?
- Is there a built-in or more Pythonic way to try to parse a string to an integer
- how to annotate heatmap with text in matplotlib
- RFCOMM without pairing using PyBluez on Debian?