Photo by Scott Graham on Unsplash

One Away Problem- Solution in Python

Write a function to check if there are one edit(or zero edits) away

Given two strings str1 and str2, return the minimum number of operations required to convert str1 to str2. You have the following three operations permitted on a word:

— Insert a character

— Delete a character

— Replace a character

Solution: