Atom

random.seed()

Resets the PRNG.

Signature

random.seed(value[, stream])

Parameters

Signed or unsigned integer seed and optional integer stream, default 54. Signed values are interpreted as their 64-bit bit pattern.

Returns

Null.

Behavior

Mutates the selected PRNG state.

Errors

Noninteger inputs.

Example

Atom
use random
random.seed(42)
x = random.int(0, 20)
random.seed(42)
assert(random.int(0, 20) == x)