That is, if your expression returns something like '-1', your code inside the if loop is still run.
E.g.
myString = 'Hello World'
myString = 'Hello World'
if myString.find('bye'):
print('I found bye.')
Output:
> I found bye.
This is because the .find command returns '-1', which is 'true'.
Instead, you need to replace the if statement to something like so:
if (myString.find('bye') != -1):
(Thanks to Stephen Hansen.)