Check If String Only Contains Certain Characters Python