def revcomp(seq: str) -> str:
    """
    reverse complement a nucleotide sequence.
    """

    rc_nuc = {
        'A': 'T',
        'C': 'G',
        'T': 'A',
        'G': 'C',
    }

    seq_rev = seq[::-1]
    seq_rev_comp = ''.join([rc_nuc[n] for n in list(seq_rev)])

    return seq_rev_comp