Name

seed

Synopsis

seed(x=None)

Initializes the generator state. x can be any hashable object. When x is None, and also automatically when module random is first loaded, seed uses the current system time to get a seed. x is normally a long integer up to 27814431486575L. Larger x values are accepted, but may produce the same generator states as smaller ones.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.