Mirror Writing
Held up to a mirror, the letter b looks like d and p looks like q (and the other way round), while the letters i, l, m, n, o, t, u, v, w and x look like themselves. Every other letter has no mirror partner. A word is mirror-stable when its mirror image reads exactly like the word itself: reading the word from the right end to the left end, with b and d swapped and p and q swapped, gives the original word.
Return True if word is mirror-stable, otherwise False. A letter without a mirror partner anywhere in the word makes it False. The empty string is mirror-stable.
Example 1
Read backwards, d o b becomes b o d after swapping b and d: the same word.
Example 2
Read backwards, d o p becomes b o q, which is not pod.
Constraints
0 <= len(word) <= 60wordhas lowercase letters only
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.