Skip to content

Instantly share code, notes, and snippets.

@darjeeling
Created November 16, 2016 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darjeeling/ec21f7262ed011bff8bcb8bed248d4b3 to your computer and use it in GitHub Desktop.
Save darjeeling/ec21f7262ed011bff8bcb8bed248d4b3 to your computer and use it in GitHub Desktop.
from operator import getitem
from itertools import izip
a = range(1,10)
b = [a] * 10
for index, items in enumerate(izip(b, b[1:])):
first_item = getitem(items[0], 0)
second_item = getitem(item[0], 0 )
if not cmp(first_item, second_item):
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment