Articles → Python → endswith function in python

endswith function in python






Purpose





Example


message = "welcome to India"

if message.endswith("India"):
    print("Valid Message")



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, May 02, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250