Created
November 16, 2016 09:26
-
-
Save darjeeling/ec21f7262ed011bff8bcb8bed248d4b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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