code: def permute_iter(elements):
      
      if len(elements) <= 1:
          yield elements
      else:
          for perm in permute_iter(elements[1:]):
              for i in range(len(elements)):
                  yield perm[:i] + elements[0:1] + perm[i:]
docs: iterator: returns a perumation by each call.