Check if String Starts with Substring using Python

startswith method

text = 'Hello world'
result = text.startswith('Hello')

print(result)

Leave a Comment

Cancel reply

Your email address will not be published.