Pythonic way to compare two lists and print out the differences

前端 未结 7 1728
滥情空心
滥情空心 2021-02-07 10:52

I have two lists which are guaranteed to be the same length. I want to compare the corresponding values in the list (except the first item) and print out the ones which dont mat

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-07 11:10

    There's a nice class called difflib.SequenceMatcher in the standard library for that.

提交回复
热议问题