Articles → Python → Startswith Function In PythonStartswith Function In PythonIn this article, we will discuss the startswith function in Python.Purpose The startswith returns true if the string starts with a specified prefix or else false.Example message = "Hello, how are you?" if message.startswith("Hello"): print("Valid Message")Output Posted By - Karan Gupta Posted On - Tuesday, April 23, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
message = "Hello, how are you?" if message.startswith("Hello"): print("Valid Message")
Query/Feedback