New answers tagged

5

GroupBy[Tuples[{0, 1}, 3], Total] (* <|0 -> {{0, 0, 0}}, 1 -> {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}}, 2 -> {{0, 1, 1}, {1, 0, 1}, {1, 1, 0}}, 3 -> {{1, 1, 1}}|> *) GatherBy[Tuples[{0, 1}, 3], Total] (* {{{0, 0, 0}}, {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}}, {{0, 1, 1}, {1, 0, 1}, {1, ...


Top 50 recent answers are included