1str.endswith(suffix[, start[, end]])
2
3text = "Python is easy to learn."
4result = text.endswith('to learn') # False
5result = text.endswith('to learn.')# True
6
1#!/usr/bin/python
2
3str = "this is string example....wow!!!";
4
5suffix = "wow!!!";
6print str.endswith(suffix)
7print str.endswith(suffix,20)
8
9suffix = "is";
10print str.endswith(suffix, 2, 4)
11print str.endswith(suffix, 2, 6)