Trying to create a list of 10 random numbers between 1-10 that do not repeat in python [duplicate]

Solution 1:

import random
random.sample(range(10), 10)