Check If String Has Certain Characters Python