I want to find out if you strings are almost similar. For example, string like \'Mohan Mehta\' should match \'Mohan Mehte\' and vice versa. Another example, string like \'Um
you might want to look at NLTK (The Natural Language Toolkit), specifically the nltk.metrics package, which implements various string distance algorithms, including the Levenshtein distance mentioned already.