Possible Duplicate:
Iterate a list as pair (current, next) in Python
I have a list like this:
list = [A, B, C, D, E, F, G]
How can I group this to get the following Python output
[(A,B), (B,C), (C, D), (D,E), (E,F), (F,G)]
So the values are grouped by the secound value but the order is preserved...