Articles → Python → Endswith Function In Python

Endswith Function In Python






Purpose





Example


message = "welcome to India"

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



Output


Picture showing the output of endswith function in python

Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250