Terry J. Reedy <tjreedy@udel.edu> added the comment: Currently return tuple (i, j, n), means that a[i:i+n] == b[j:j+n], where both matching blocks are the same length. https://docs.python.org/3/library/difflib.html#difflib.SequenceMatcher.get_m... This would not be the case if a has an ignored space and b does not. Changing the current definition would break existing code and would require quadruples to return two different lengths. This would require either a new parameter for the function to select the behavior or a new function with a new name. Either option would require justification by actual use cases. I cannot see what they might be. An way to have junk chars completely ignored is to strip them from both strings before calling SequenceMatcher. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43473> _______________________________________