Find function in python

In the week 3 course of Fundamentals of Data Science we learn about the find() function for strings, but it is case sensitive. How to search in a string without case sensitivitiy?

You can use “re” which is Regular Expressions in python.

1 Like

Can you post a short example of just the command using re to find the string “ata” from a variable

Here’s an example

import re

if'mandy', 'Mandy Pande', re.IGNORECASE):
    # Is True

Taken from this source

1 Like