def get_kmer_hit_ends(seq, kmer):
    """
    Given a sequence and a k-mer, return match end positions (1-based) of k-mer
    in sequence. If not hits, return empty list.

    >>> seq = "AACGAAACG"
    >>> kmer = "ACG"
    >>> get_kmer_hit_ends(seq, kmer)
    [4, 9]
    >>> kmer = "ACC"
    >>> get_kmer_hit_ends(seq, kmer)
    []

    """
    assert seq, "seq empty"
    assert kmer, "kmer empty"
    k = len(kmer)
    hit_list = []
    for i in range(len(seq)-k+1):
        end = i+k
        check_kmer = seq[i:end]
        if check_kmer == kmer:
            hit_list.append(end)
    return hit_list