C2_W1 / Part3.2 allow switches

I solved the problem by applying 2 things:

  1. Passing allow_switches argument into edit_one_letter (it is used in the edit_two_letters function logic). It is also necessary to check allow_switches in if-else construction before adding the result of switch_letter to the final set in edit_two_letters.

  2. allow_switches should be checked in edit_one_letter as well. If it’s true, then you should apply switch_letter.

So, we should check switch_letter both in edit_one_letter and edit_two_letters.