Python Check If String Ends With Substring