random

The random module generates pseudorandom numbers.

  • random.random() = returns a random float between 0.0 and 1.0
  • random.randint(low, high) = takes in a low and high integers and returns a random integer (including both)
  • random.choice(t) = returns a random elements from the sequence t
  • also generates random values from continuous probability distributions