from Levenshtein import distance s1 = "kitten" s2 = "sitting" print(distance(s1, s2)) # Output: 3
from Levenshtein import editops s1 = "kitten" s2 = "sitting" ops = editops(s1, s2) print(ops) # Output: [('delete', 0), ('replace', 1, 's'), ('insert', 4, 'g')]In this example, we use the `editops()` function to generate the edit operations required to transform "kitten" into "sitting". The output is a list of tuples, where each tuple represents an edit operation. The first element of the tuple is the operation type (delete, replace, or insert), and the remaining elements provide additional information about the operation (e.g. index of the character to delete/replace/insert, replacement character). Overall, python Levenshtein editops is a useful package library for working with strings and computing edit distances. Its functions are easy to use and can be integrated into many different applications.