Generators for calculating a) the permutations of a sequence and b) the combinations and selections of a number of elements from a sequence. Uses Python 2.2 generators. Similar solutions found also in comp.lang.python Keywords: generator, combination, permutation, selection See also: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/105962 …