Somehow kagi.com manages to rank the top results better than Google:
- a stackoverflow answer that has a useful example: https://stackoverflow.com/a/18351977/
- the Python documentation: https://docs.python.org/3/library/stdtypes.html
- Pandas documentation (they also have an endswith): https://pandas.pydata.org/docs/reference/api/pandas.Series.s...
- a blog post on Python regular expressions (this looks useful but is a wrong result for this query): https://www.johndcook.com/blog/python_regex/
- something that could be a content farm with rephrased Python documentation: https://pythontic.com/concepts/string/introduction
The top three results are good, and I guess it's a matter of taste whether the succinct Stackoverflow answer is better than the verbose official documentation.