#如'abbcc','abbdd' 找到abba='abbcc'b='abbdd'from difflib import *s=SequenceMatcher(None,a,b)m=s.find_longest_match(0,len(a),0,len(b))print a[m.a:m.a+m.size]