[python] How to determine whether a substring is in a different string