Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _replaces(self):
"""tge"""
return {concat(a, c, b[1:])
for a, b in self.slices[:-1]
for c in ALPHABET}
def _deletes(self):
"""th"""
return {concat(a, b[1:])
for a, b in self.slices[:-1]}
def _inserts(self):
"""thwe"""
return {concat(a, c, b)
for a, b in self.slices
for c in ALPHABET}
def _transposes(self):
"""teh"""
return {concat(a, reversed(b[:2]), b[2:])
for a, b in self.slices[:-2]}