Aug-22-2020, 08:15 PM
(Aug-22-2020, 08:00 PM)bitcoin10mil Wrote: x is the first digitWith a little change, it works with this:
num2= 2nd digit
num3= 3rd digit
num4= 4th digit
def fourdigit(first): n = random.randint(100, 999) n = str(first) + str(n) digits = set(n) if(len(digits) < len(n)): return fourdigit(first) return int(n)rather than generating a 4 digit number it just generates a 3 digit number and adds the first digit to the front.