Use the zip method in Python. This function returns a list of tuples, where the i-th tuple contains the i-th element from each of the argument sequences or iterables
while running:
for thiselem,nextelem in zip(li, li[1 : ] + li[ : 1]):
#Do whatever you want with thiselem and nextelem