def is_meta_pair(word1, word2):
    """Return true if word1 and word 2 are metathesis pairs, i.e. if
    you can transform one into the other by switching two letters.
    word1, word2: string
    """
    # Run through ever pair of letters in word1. Take the first letter and
    # the second, first and third, ...then second and third, second and fourth...
    # Check the letter-swapped version of word1 vs word2, and if they're the
    # same return True.
    for i in range(len(word1)-1):
        for j in range(i+1, len(word1)):
            # Create a new word formed by swapping the ith and jth letter of word1
            test_word = word1[:i]+word1[j]+word1[i+1:j]+word1[i]+word1[j+1:]
            if test_word == word2:
                return True
    return False