def bits(n) : # return all bitstrings of length n if n = 0 : yield []