def rsplit_hst(string, *seps):
    """Returns a three element tuple (tail, sep, head) with
       `"".join (rsplit_hst (string)) == string` split around the
       last (i.e., rightmost) occurrence of `sep`.

       Based on Raymond Hettinger's proposal for a new
       string-method `str.rpartition` (python-dev@python.org).

       >>> rsplit_hst ("a", ",")
       ('', '', 'a')
       >>> rsplit_hst ("a,b", ",")
       ('a', ',', 'b')
       >>> rsplit_hst ("a,b,c", ",")
       ('a,b', ',', 'c')
       >>> rsplit_hst (",a", ",")
       ('', ',', 'a')
       >>> rsplit_hst (",a,b", ",")
       (',a', ',', 'b')
       >>> rsplit_hst ("a,b", "b")
       ('a,', 'b', '')
       >>> rsplit_hst ("a,bb", "b")
       ('a,b', 'b', '')
       >>> rsplit_hst (",", ",")
       ('', ',', '')
    """
    if not seps:
        raise TypeError('rsplit_hst() takes at least 2 arguments (1 given)')
    for sep in seps:
        parts = string.rsplit(sep, 1)
        if len(parts) == 2:
            return parts[0], sep, parts[1]
    return '', '', parts[0]
