I have to compare 2 python strings, each of which is a multiline string (these are read from a file).
My code is this
list1 = [string1]
list2 = [string2]
differ = difflib.HtmlDiff()
htmlOut = differ.make_file(list1, list2)
When I copy htmlOut to an HTML file and open it in Chrome, multiline strings became a single line string.
I've also tried directly printing htmlOut to a file and then open that file. Even this approach doesn't work. What should I do here?