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


Picture showing the output of startswith function in python



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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250