Python Check If String Contains Any Substring In Cpp