string = "abcdefing" res = string.endswith("ing") print(res) #output True res = string.endswith("abc") print(res) #output False