How to do it...

Note that examples are provided where output is generated for a command. Also note that, as these are randomized values, your results may be different:

  • The seed(a=None, version=2) function initializes the PRNG. If a is None, any system-based randomness sources that are available will be used to generate the seed; otherwise, the current system time is used for the seed value. If a is an integer, then it will be used directly as the seed value. version can be 1 or 2. The default is 2, meaning strings, bytes, and bytearrays will be converted to integers and all bits will be used for the seed. If version 1 is used (necessary when working with versions prior to 3.2), the conversion to integer creates a smaller range of seed values. ...

Get Secret Recipes of the Python Ninja now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.