New GitHub issue #96363 from jwes44:<br>

<hr>

<pre>
On windows 11 and python 3.9.7 and this code I get poor results. The problem seems to be that the first call to difflib.SequenceMatcher.find_longest_match() returns Match(a=14, b=549, size=1) which is clearly not the longest match.

import difflib
from difflib import SequenceMatcher
a = r"iu his chest. ' Roar upon roar of applause beat upon his eardrums. . He sought for and found the motionless body of the tiger and moved toward it on feet that seemed strangely mmib beneath him, but already his keen brain Was working. In his struggles with the tiger, he had approached within a half dozen paces of the scarlet gate. While he had fought, the scarlet-clad guards and. the priests had ducked behind the brass grating that closed the exit, but now they were filing back. Beyond them, Bourtai had said, a horse would be waiting. But Wan Tengri's resolution was already formed."
b = r"in his chest. Roar upon roar of applause beat upon his eardrums. He sought for and found the motionless body of the tiger and moved toward it on feet that seemed strangely numb beneath him, but already his keen brain was working. In his struggles with the tiger, he had approached within a half dozen paces of the scarlet gate. While he had fought, the scarlet-clad guards and the priests had ducked behind the brass grating that closed the exit, but now they were filing back. Beyond them, Bourtai had said, a horse would be waiting. But Wan Tengri's resolution was already formed."
s = SequenceMatcher(None, a,b)
for tag, i1, i2, j1, j2 in s.get_opcodes():
    print('{:7}   a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
        tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))


</pre>

<hr>

<a href="https://github.com/python/cpython/issues/96363">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>