Articles → Python → Endswith Function In PythonEndswith Function In PythonIn this article, we will discuss the endswith function in Python.Purpose The endswith function returns true if the string ends with a specified suffix else false.Example message = "welcome to India" if message.endswith("India"): print("Valid Message") Output Posted By - Karan Gupta Posted On - Thursday, May 2, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
message = "welcome to India" if message.endswith("India"): print("Valid Message")
Query/Feedback