Skip to content

Instantly share code, notes, and snippets.

@oranie
Created January 17, 2020 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oranie/158753f732832b0308a9b7d1bcccc95b to your computer and use it in GitHub Desktop.
Save oranie/158753f732832b0308a9b7d1bcccc95b to your computer and use it in GitHub Desktop.
ysaku-lie.py
# -*- 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