I have a string in which the word \"LOCAL\" occurs many times. I used the find() function to search for this word but it returns another word \"Locally\" as wel
line1 = "This guy is local"
line2 = "He lives locally"
if "local" in line1.split():
print "Local in line1"
if "local" in line2.split():
print "Local in line2"