The word LOVE displays a perfect symmetry in the English alphabet: its letters are evenly distributed around the center.
We say the love between the letters of the word is mutual if this condition is met.
Determine if the love between the letters of a word is mutual. This is done in the following way:
Write a function positions that takes a word $$w$$ (str). The function must return a tuple containing the position in the alphabet (int) for each letter in word $$w$$. The letter A is at position 0 in the alphabet, the letter B at position 1, …, and the letter Z at position 25. The function should not make a distinction between uppercase and lowercase letters, and all characters of word $$w$$ that aren't letters should be ignored.
Write a function ismutual that takes two arguments: i) a sequence (list or tuple) of integers (int) and ii) an even number $$n \in \mathbb{N}_0$$ (int). You may assume that $$0 \leq i < n$$ for each number $$i$$ in the sequence. The function must return a Boolean value (bool) that indicates if the numbers in the sequence can be grouped in pairs, such that each number pair is positioned symmetrically against the center of the number sequence $$0, 1, 2, \ldots, n - 1$$.
Write a function mutual_love that takes a word $$w$$ (str). The function must return a Boolean value (bool) that indicates if the love between the letters of word $$w$$ is mutual. The function should not make a distinction between uppercase and lowercase letters, and all characters of word $$w$$ that aren't letters should be ignored.
>>> positions('LOVE')
(11, 14, 21, 4)
>>> positions('mutual')
(12, 20, 19, 20, 0, 11)
>>> ismutual((11, 14, 21, 4), 26)
True
>>> ismutual([12, 20, 19, 20, 0, 11], 26)
False
>>> mutual_love('LOVE')
True
>>> mutual_love('mutual')
False