here is an example code
>>> array = [('The', 'Blue'),('men','Green'),('his','Red'),('beautiful','Yellow')]
>>> z = [y for (x,y) in array]
>>> l=[(z[i],z[i+1]) for i in range (len(z)-1)]
>>> l
>>> [('Blue', 'Green'), ('Green', 'Red'), ('Red', 'Yellow')]
Is there an alternative way to write this? say, maybe as a one-liner? The above code is better suited from running via a console.
Thanks all