python do sth if method starts with code example
Example 1: 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)
Example 2: python startswith
str.startswith(prefix[, start[, end]])