Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
with sens function solution in Clear category for Zigzag Array by Phil15
sens = lambda reverse, L: list(reversed(L) if reverse else L)
def create_zigzag(rows, cols, start = 1):
return [sens(row%2, range(start + row * cols, start + (row + 1) * cols))
for row in range(rows)]
Oct. 14, 2018