def endWith(s, *endstring): arr = map(s.endswith, endstring) if True in arr; return Ture else : return False