#endswith() function: the function of string which returns the value matching
#the argument or else returns nothing.
example: to check if the given email matches the domain of the sample email.
a=input('enter email ID :')
if a.endswith('@draken.com'): # here suffix should come @draken.com prefix independent
print('valid Email ID')
else:
print('not valid Email ID')
#output
--------------------------------------------------------------------------------------
enter email ID :grayn@draken.com
valid Email ID
--------------------------------------------------------------------------------------
enter email ID :robin@dragon.com
not valid Email ID
--------------------------------------------------------------------------------------
#!/usr/bin/python
str = "this is string example....wow!!!";
suffix = "wow!!!";
print str.endswith(suffix)
print str.endswith(suffix,20)
suffix = "is";
print str.endswith(suffix, 2, 4)
print str.endswith(suffix, 2, 6)