[python] Iterating over every two elements in a list