endswith() - Returns true if the string ends with the specified value

Returns true if the string ends with the specified character or substring.  The comparison is case-sensitive.

Example

Python
str = 'The quick brown fox jumped over the lazy dog'
print(str.endswith('dog'))
print(str.endswith('Dog'))

Output

True
False