19.1. Random About

  • random.random() - Random float: 0.0 <= x < 1.0

  • random.randint(min, max) - Return a random integer N such that min <= N <= max. Max is included

  • random.gauss(mu, sigma) - Gaussian distribution. mu is the mean, and sigma is the standard deviation

  • random.shuffle(list) - Randomize order of list (in place)

  • random.choice(list) - Single random element from a sequence

  • random.sample(list, k) - k random elements from list without replacement

  • random.seed(a=None, version=2) - Initialize the random number generator. If a is omitted or None, the current system time is used

19.1.1. Pseudo and Pure random numbers

  • What are pseudorandom numbers?

  • Why it is not possible to generate a pure random number?