我想做一个
预期输出是
[[(0,0), (2,0), (4,0), (6,0)],
[(1,1), (3,1), (5,1), (7,1)],
[(0,2), (2,2), (4,2), (6,2)],
[(1,3), (3,3), (5,3), (7,3)]]
我在修补这个:
>>> [[(x,y) for x in range(7)[::2]] for y in range(4)]
[[(0,0), (2,0), (4,0), (6,0)],
[(0,1), (2,1), (4,1), (6,1)],
[(0,2), (2,2), (4,2), (6,2)],