One Switch Strings

One Switch Strings

CheckiO平台有一个类似的任务Verify Anagrams 、 但在这个任务中,您必须确定单词是否是同义词。在本任务中,任务将略有不同。给您两个字符串 字符串,您需要确定是否可以交换第一个字符串中的两个字母来得到第二个字符串。如果可以(或者单词相同)- 则 返回 True如果不能 False.

例如,字符串"btry", 如果我们交换yt, 我们得到 "byrt".

输入:两个字符串 (str).

输出:逻辑值 (bool).

示例:

assert switch_strings("btry",...
You should be an authorized user in order to see the full description and start solving this mission.