permutations with repetition in python,"sorted(itertools.product((0, 1), repeat=3), key=lambda x: sum(x))"