check if there is a ? at the ending of a string 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