Python String endswith() - Programiz
www.programiz.com › python-programming › methodsPython String endswith () In this tutorial, we will learn about the Python String endswith () method with the help of examples. The endswith () method returns True if a string ends with the specified suffix. If not, it returns False. Example message = 'Python is fun' # check if the message ends with fun print (message.endswith ( 'fun' ))