I have a 7x7 board and I want to select some elements from it. The elements I want to select are marked
o, the other ones are marked
Here is the board:
xoxoxox ooooooo xooooox ooooooo xooooox ooooooo xoxoxox
I use indexing starting from 1. The point
(1,1) is the top left.
The current list comprehension I have to select the
o-elements is the following:
[(r,c) | r<-[1..7], c<-[1..7], (not (even r) && not (even c) && r/=1 && r/=7 && c/=1 && c/=7) || even r || even c]
I am wondering if I can make this list comprehension more simple. The code above is in Haskell, however, pseudo-code or Python list comprehensions are also fine with me.