def lexicographic(alphabet):
 for n in count():
  for e in product(alphabet, repeat=n):
   (yield e)

def lexicographic ( alphabet ) : for n in count ( ) : for e in product ( alphabet , repeat = n ) : ( yield e )
lexicographic -> iterator the words with symbols in alphabet .