def test_is_one_edit2(self): self.assertTrue(is_one_edit2("abc", "abd")) self.assertFalse(is_one_edit2("abc", "aed")) self.assertFalse(is_one_edit2("abcd", "abcd"))
from algorithms.strings import is_one_edit,is_one_edit2 str1 = "geek" str2 = "gesek" str3 = "sunday" str4 = "saturday" print(is_one_edit(str1,str2)) print(is_one_edit(str3,str4)) print(is_one_edit2(str1,str2)) print(is_one_edit2(str3,str4))