code: def xselections(items, n):
      
      if n==0:
          yield []
      else:
          for i in xrange(len(items)):
              for ss in xselections(items, n-1):
                  yield [items[i]]+ss
docs: Takes n elements (not necessarily distinct) from the sequence, order
      matters.
  
      @see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465