Python Check String For Substring Method In Apex