Python Check If String Contains Two Substrings