Do a Google search for "python endswith". Obviously,
https://docs.python.org/3/library/stdtypes.html#str.endswith is the correct best hit for that term. Why does Google rank that page below all of the well-known low-quality content farms like GeeksforGeeks, W3Schools, and Tutorialspoint?
If I need to get something done quick, those sites will give me a quick 5 second refresher with clear examples.
Actually, in the doc you described as "obviously the correct hit", all I see is
> str.endswith(suffix[, start[, end]])
> Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop comparing at that position.
Meanwhile, the first hit in Google for me is Programiz, which has actual real examples without any additional clicking around or trying to understand how the information is structured.
Besides, I know the docs exist, I don't need a google search for it. I'll click on the content farms every time because they've consistently been the fastest way for me to get what I need.