def get_rc(sequence):
    """Returns the reverse complement of sequence. Sequence may only
        contain letters A, C, G, or T (in uppercase)."""
    table = ['A', 'C', 'G', 'T']

    sequence = list(sequence)
    for key, value in enumerate(sequence):
        sequence[key] = table[3 - table.index(value)]

    return ''.join(sequence[::-1])