https://wikimass.com/python/string-endswith