Solving Leetcode Question 859, Buddy Strings, Using Python

The Prompt

Given two input strings, (a) and (b), return (true) if two letters in (a) can be swapped so that the result is equal to (b), otherwise return (false).

Leetcode #859

The Code

We’re given the following template to start with.