Articles → Python → startswith function in python

startswith function in python






Purpose





Example


message = "Hello, how are you?"

if message.startswith("Hello"):
    print("Valid Message")



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, April 23, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250