Created
April 20, 2016 01:51
-
-
Save riceluxs1t/d8193c7af0bfb417772be51f38b4c38d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
variant = [[1,2,4,5,6],[7,8,10,11,12],[13,14,16,17,18],[19,20,22,23,24],[25,26,28,29,30]] | |
for a in variant: | |
row = a | |
next = row[1] | |
for i in row: | |
if next-i == 1: | |
if next == row[1]: | |
next = row[2] | |
elif next == row[2]: | |
next = row[3] | |
elif next == row[3]: | |
next = row[4] | |
elif next == i: | |
break | |
else: | |
print i+1 | |
if next == row[2]: | |
next = row[3] | |
elif next == row[3]: | |
next = row[4] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment