how to check if a string ends with in python code example
Example: endswith python
str.endswith(suffix[, start[, end]])
text = "Python is easy to learn."
result = text.endswith('to learn') # False
result = text.endswith('to learn.')# True
str.endswith(suffix[, start[, end]])
text = "Python is easy to learn."
result = text.endswith('to learn') # False
result = text.endswith('to learn.')# True