Python Check If Substring Exists Ai