Powershell Check If String Ends With Substring In Python