s1 = u'А роза упала на лапу Азора'
s2 = u'Дай, Джим, на счастье лапу мне'
difflib.SequenceMatcher.find_longest_match()
>>> from difflib import SequenceMatcher as SM
>>> s1 = 'A roza upala na lapu Azora'
>>> s2 = 'Dai, Djim, na s4astie lapu mne'
>>> sm = SM(lambda c: c in set(' ,'), s1, s2)
>>> m = sm.find_longest_match(0, len(s1), 0, len(s2))
>>> s1[m.a:m.b]
' lapu '