fork download
  1. # your code goes here
  2. import difflib
  3. string1="HI"
  4. string2="hi"
  5. sequence_matcher = difflib.SequenceMatcher(None, string1.lower(), string2.lower())
  6. match=list(sequence_matcher.get_matching_blocks())
  7. print(match)
Success #stdin #stdout 0.02s 9620KB
stdin
Standard input is empty
stdout
[Match(a=0, b=0, size=2), Match(a=2, b=2, size=0)]