API Reference / Classes / random / Random Random Standard library class random.Random View source class Random class Random Fields 2 gen RandomGenerator gauss_next Optional[float] Constructors 1 __init__ __init__(self, seed: Optional[int] = None) Defined in random Methods 23 seed seed(self, a: Optional[int]) Defined in random getstate getstate(self) Defined in random setstate setstate(self, state) Defined in random getrandbits getrandbits(self, k: int) Defined in random bit_length bit_length(self, n: int) Defined in random randrange randrange(self, start: int, stop: int, step: int = 1) Defined in random randint randint(self, a: int, b: int) Defined in random random random(self) Defined in random choice choice(self, sequence: Generator[T], T: type) Defined in random @overload choice(self, sequence: List[T], T: type) Defined in random shuffle shuffle(self, x) Defined in random uniform uniform(self, a, b) Defined in random triangular triangular(self, low: float, high: float, mode: float) Defined in random gammavariate gammavariate(self, alpha: float, beta: float) Defined in random betavariate betavariate(self, alpha: float, beta: float) Defined in random expovariate expovariate(self, lambd: float) Defined in random gauss gauss(self, mu: float = 0.0, sigma: float = 1.0) Defined in random paretovariate paretovariate(self, alpha: float) Defined in random weibullvariate weibullvariate(self, alpha: float, beta: float) Defined in random normalvariate normalvariate(self, mu: float = 0.0, sigma: float = 1.0) Defined in random lognormvariate lognormvariate(self, mu: float, sigma: float) Defined in random vonmisesvariate vonmisesvariate(self, mu: float, kappa: float) Defined in random sample sample(self, population, k: int) Defined in random choices choices(self, population, weights: Optional[List[T]], cum_weights: Optional[List[T]], k: int, T: type) Defined in random
class Random class Random Fields 2 gen RandomGenerator gauss_next Optional[float] Constructors 1 __init__ __init__(self, seed: Optional[int] = None) Defined in random Methods 23 seed seed(self, a: Optional[int]) Defined in random getstate getstate(self) Defined in random setstate setstate(self, state) Defined in random getrandbits getrandbits(self, k: int) Defined in random bit_length bit_length(self, n: int) Defined in random randrange randrange(self, start: int, stop: int, step: int = 1) Defined in random randint randint(self, a: int, b: int) Defined in random random random(self) Defined in random choice choice(self, sequence: Generator[T], T: type) Defined in random @overload choice(self, sequence: List[T], T: type) Defined in random shuffle shuffle(self, x) Defined in random uniform uniform(self, a, b) Defined in random triangular triangular(self, low: float, high: float, mode: float) Defined in random gammavariate gammavariate(self, alpha: float, beta: float) Defined in random betavariate betavariate(self, alpha: float, beta: float) Defined in random expovariate expovariate(self, lambd: float) Defined in random gauss gauss(self, mu: float = 0.0, sigma: float = 1.0) Defined in random paretovariate paretovariate(self, alpha: float) Defined in random weibullvariate weibullvariate(self, alpha: float, beta: float) Defined in random normalvariate normalvariate(self, mu: float = 0.0, sigma: float = 1.0) Defined in random lognormvariate lognormvariate(self, mu: float, sigma: float) Defined in random vonmisesvariate vonmisesvariate(self, mu: float, kappa: float) Defined in random sample sample(self, population, k: int) Defined in random choices choices(self, population, weights: Optional[List[T]], cum_weights: Optional[List[T]], k: int, T: type) Defined in random