Answers for ".startswith"

9

python startswith

text = "Python is easy to learn."

result = text.startswith('is easy')
# returns False
print(result)

result = text.startswith('Python is ')
# returns True
print(result)

result = text.startswith('Python is easy to learn.')
# returns True
print(result)
Posted by: Guest on October-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language