PyDocs

Nav

Numeric and Mathematical Modules

seed

random

function (source)
  • seed(a=None, version=2)
Initialize internal state from a seed.

The only supported seed types are None, int, float,
str, bytes, and bytearray.

None or no argument seeds from current time or from an operating
system specific randomness source if available.

If *a* is an int, all bits are used.

For version 2 (the default), all of the bits are used if *a* is a str,
bytes, or bytearray.  For version 1 (provided for reproducing random
sequences from older versions of Python), the algorithm for str and
bytes generates a narrower range of seeds.
Changed in 3.2, 3.11
  • 3.2: Moved to the version 2 scheme which uses all of the bits in a string seed.
  • 3.11: The seed must be one of the following types: None, int, float, str, bytes, or bytearray.
0 Examples
No examples for random/seed.
See Also
No see-alsos for random/seed
0 Notes
No notes for seed