Comparing text corpora sentence-wise in Python I have two corpora (in the form of list of sentences); one is the "original" one, the other is a version of it with some minor changes (with contractions expaned, for instance):

s1 = ['He's a real stupid', 'There's no need to worry', 'All right, my friends']
s2 = ['He is a real stupid', 'There is no need to worry', 'All right, my friends']


I'd like to get some rendering of the corresponding sentence pairs where IS some difference between the sentences. Is there any elegant solution to this?
There are several ways to do this, but, assuming the lists are the same length and the sentences you wish to compare are in the same indices int their respective lists, you can handle this with a simple list comprehension:

diffs = [(s1[i], s2[i]) for i in range(len(s1)) if s1[i] != s2[i]]