def endswith(string):
 def ends_with(value):
  validate(text, value)
  if (not value.endswith(string)):
   raise ValueError("'{0}' does not end with '{1}'".format(value, string))
  return True
 return ends_with

def endswith ( string ) : def ends_with ( value ) : validate ( text , value ) if ( not value . endswith ( string ) ) : raise ValueError ( "'{0}' does not end with '{1}'" . format ( value , string ) ) return True return ends_with
checks if the string value ends with another string .