What is the most pythonic way of getting the following:
(False, False, False)
(False, False, True)
(False, True, False)
(False, True, True)
...
I have n
variables, each taking a value True
or False
, how can I combine these? I was thinking of using range(n)
and then checking the bits of generated integers, but this seems too hacky.