I have a list l = [100, 200, 300, 400, 500]
I want to loop through it using two variables:
for x, y in ???:
print x, y
I want to get the result like:
100, 200
200, 300
300, 400
400, 500
I know there are many ways to do it, but I am not sure which one is elegant. Please let me know if you know any elegant way.