How would i generate a random number in python without duplicating numbers
Generate a random number
check if there are any duplicates, if so go back to 1
you have a number with no duplicates

OR
Generate it one digit at a time from a list, removing the digit from the list at each iteration.

Generate a list with numbers 0 to 9 in it.
Create two variables, the result holding value 0, and multiplier holding 1.
Remove a random element from the list, multiply it by the multiplier variable, add it to the result.
multiply the multiplier by 10
go to step 3 and repeat for the next digit (up to the desired digits)
you now have a random number with no repeats.
I was wondering how to generate a random 4 digit number that has no duplicates in python 3.6
I could generate 0000-9999 but that would give me a number with a duplicate like 3445, Anyone have any ideas
thanks in advance