Created
January 17, 2020 08:00
-
-
Save oranie/158753f732832b0308a9b7d1bcccc95b to your computer and use it in GitHub Desktop.
ysaku-lie.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import difflib | |
str1 = u"配られたカードで勝負するしかないのさ、それがどういう意味であれ" | |
str2 = u"配られたカードで勝負するっきゃないのさ、それがどうゆう意味であれ" | |
s = difflib.SequenceMatcher(None, str1, str2).ratio() | |
print str1, "<~>", str2 | |
print "match ratio:", s, "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment