I need to generate all possible $4 \times 4$ symmetric binary matrices with $0$s on its main diagonal and in which $1$ appears $6$ times. Examples:
[[0,0,0,0],
[0,0,1,1],
[0,1,0,1],
[0,1,1,0]]
[[0,1,1,0],
[1,0,1,0],
[1,1,0,0],
[0,0,0,0]]
[[0,1,0,1],
[1,0,0,1],
[0,0,0,0],
[1,1,0,0]]
How could I do that in Python?
Here's a script that does it: