Articles → Python → startswith function in pythonstartswith function in pythonIn this article, we will discuss startswith function in python.Purpose Startswith returns true if string starts with specified prefix else false.Example message = "Hello, how are you?" if message.startswith("Hello"): print("Valid Message")Output Click to EnlargePosted 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