>>> import difflib>>> matcher = difflib.SequenceMatcher(None, 'foo', 'for')>>> sum(size for start, end, size in matcher.get_matching_blocks())2>>> max(map(len, ('foo', 'for'))) - _1>>>>>>>>> matcher = difflib.SequenceMatcher(None, 'foo', 'food')>>> sum(size for start, end, size in matcher.get_matching_blocks())3>>> max(map(len, ('foo', 'food'))) - _1http://docs.python.org/2/library/difflib.html#difflib.SequenceMatcher.get_matching_blocks
http://docs.python.org/2/library/difflib.html#difflib.SequenceMatcher.get_oppres



