I have a delta_y value that I do not know if its positive or negative, and I'd like to make a general list comprehension solution for it. So its either gonna be a list of tuples (10, 10), (10, 11)... or (10,10), (10,9)...
I've looked around and I dont understand why this isnt working
dxdy = [(10, 10 + i) for i in range(0, delta_y) if delta_y >= 0 else (10, 10 + i) for i in range(0, delta_y, -1))]
Says that the "else" is invalid syntax
Tried looking on stackoverflow to find why but didnt help