def string_range(last):
 for k in range(len(last)):
  for x in product(string.ascii_lowercase, repeat=(k + 1)):
   result = ''.join(x)
   (yield result)
   if (result == last):
    return

def string_range ( last ) : for k in range ( len ( last ) ) : for x in product ( string . ascii_lowercase , repeat = ( k + 1 ) ) : result = '' . join ( x ) ( yield result ) if ( result == last ) : return
compute the range of string between "a" and last .