Brian Su says to YSITD dx_ls = [0, 1, 0, -1] dy_ls = [1, 0, -1, 0] for dx, dy in zip(dx_ls, dy_ls): xx = x + dx yy = y + dy #(xx, yy) is the new point