Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_similar(self, first, second):
- flag = False
- for ch in range(len(first)):
- if second[ch] != first[ch]:
- if flag is True:
- break
- flag = True
- else:
- return True
- return False
- def test_get_same_words(self):
- first = 'кот'
- for word in test.get_similar(какие-то аргументы):
- self.assertTrue(self.is_similar(first, word))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement