I have been wracking my brains out for 3 hours straight, but I still don\'t get it, so I am asking here. (I wrote Python in the title, but this could be for pretty much any
In Python, use itertools for stuff like this
from itertools import product for i in product([0,1], repeat=5): print i
Yields:
(0, 0, 0, 0, 0) (0, 0, 0, 0, 1) (0, 0, 0, 1, 0) (0, 0, 0, 1, 1) (0, 0, 1, 0, 0) etc...