Python Check If Substring Exists Definition