vandermies vandermies - 1 month ago 7
Python Question

Generate X random integers between Y and Z?

Is there a function in Python (I'm working with SageMath) to get 10 random integers between 0 and 30, for instance, without repeating them?

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