string.endswith(char) returns true, if the last character of the string is the given character.
string.endswith(string) return true, if the tail of the string is equal to the given string. This is faster than first slicing of the end with : and then comparing the slice, since it avoids copying of strings.
