There's not a built in way to do it, but this works:
from itertools import izip_longest
for item, nextitem in izip_longest(iterable, iterable[1:]):
if item == nextitem:
do whatever better
depending on what your iterable actually is, you could do zip(iterable[:-1], iterable[1:])