def is_abba(abba_str):
    """Returns true if 4 character string consists of a pair of two different characters followed
    by the reverse of that pair"""
    if len(abba_str) != 4:
        raise Exception
    return abba_str[0] == abba_str[3] and abba_str[1] == abba_str[2] and abba_str[0] != abba_str[1]