This is a core module in Python

The random module generates random numbers. Currently, it uses the Mersenne Twister PRNG. The only functions that are important are getrandbits, random, shuffle, seed and randint.

Most important functions Edit

  • random.getrandbits(bits) - return bits of randomness
  • random.random() - return a random decimal number >= 0.0 but <= 1.0
  • random.shuffle(dict) - shuffle a dict and return the shuffled version
  • random.seed(seed) - seed the PRNG with seed, useful for debugging only, the PRNG is usually auto-seeded
  • random.randint(min, max) - return a random number >= min but <= max

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.