Pastebin

Paste #2670: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

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)
            print s, stop
            if s == stop: return

generate_strings("100", "341")

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.