Python string endswith() method
Python String endswith() Method Description The endswith() method returns True if a string ends with the specified substring, and False otherwise. It optionally matches using given start and end indices. Syntax var.endswith(sub[, start[, end]]) Parameters sub − This can be…