What\'s the best way of getting just the difference from two multiline strings?
a = \'testing this is working \\n testing this is working 1 \\n\' b = \'testi
Building on @Chris_Rands comment, you can use the splitlines() operation too (if your strings are multi-lines and you want the line not present in one but the other):
b_s = b.splitlines() a_s = a.splitlines() [x for x in b_s if x not in a_s]
Expected output is:
[' testing this is working 2']