Get a random n digit number with distinct digits and first not a 0
Python 2, 77 bytes



from random import*
r=range(10)
while[1]&gt;r:shuffle(r)
print`r`[1:input()*3:3]


Try it online!

Shuffles the list of 10 digits until it doesn't start with 0, then makes a number with the first n digits listed.