Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Eats, shoots and reverses solution in Clear category for Zigzag Array by veky
from itertools import count
def create_zigzag(rows, cols, start=1):
it = count(start)
z_array = [[next(it) for _ in range(cols)] for _ in range(rows)]
for row in z_array[1::2]: row.reverse()
return z_array
Nov. 16, 2018