vandermies vandermies - 1 year ago 80
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 Source
import random
random.sample(range(31), 10) 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download