find if a substring exists in python