Pastebin
Paste #2671: No description
< previous paste - next paste>
Pasted by Anonymous Coward
def generate_strings(start, stop, alphabet="0123456789"):
    for digit in start:
        for x in product(*( [alphabet[alphabet.index(digit):]] + [alphabet] * (slen -1) )):
            s = ''.join(x)
            yield s
            if s == stop: return
for x in generate_strings("321", "341"):
    print x
New Paste
Go to most recent paste.
 
      