def revcomp(seq):
    """Returns the reverse complement of a DNA sequence."""
    COMPLEMENT_DICT = {'A': 'T', 'G': 'C', 'T': 'A', 'C': 'G', 'N': 'N'}
    rc = ''.join([COMPLEMENT_DICT[base] for base in seq])[::-1]
    return rc