How to print the comparison of two multiline strings in unified diff format?

前端 未结 2 1242
耶瑟儿~
耶瑟儿~ 2021-02-12 12:41

Do you know any library that will help doing that?

I would write a function that prints the differences between two multiline strings in the unified diff format. Somethi

2条回答
  •  抹茶落季
    2021-02-12 13:38

    Did you have a look at the built-in python module difflib? Have a look that this example

提交回复
热议问题