Python Language Tutorial:

Python Language Random module


  • random.seed(a=None, version=2) (version is only avaiable for python 3.x)
  • random.getstate()
  • random.setstate(state)
  • random.randint(a, b)
  • random.randrange(stop)
  • random.randrange(start, stop, step=1)
  • random.choice(seq)
  • random.shuffle(x, random=random.random)
  • random.sample(population, k)

Python Language Random module Examples:

Related Python Language Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.