first and second. A **swap** picks two positions in a string and exchanges the letters at them.
Return True if the strings can be made identical with at most one swap in just one of them. Otherwise, return False.first="lemon", second="lomen" → True
Swapping e and o in the first string is enough.
first="stone", second="notes" → False
The strings differ in four positions, which one swap cannot fix.
first="pear", second="pear" → True
The strings already match, so no swap is needed.
first="lemon", second="lomen"
True
Run checks the first 3 tests in your browser. Submit checks all 106 tests on the server, hidden ones included.