Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get similarity score of two words with python
def get_score(word1, word2):
shared_chars = [char for char in word1.lower() if char in word2.lower()]
return len(shared_chars)
# Usage
get_score('murat', 'burak')
# > 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.