8.45. random 模块 API 文档
8.45.1. API
def __init__(self):...
Initialize the random number generator.
def random()->float:...
Return a random float in the range [0.0, 1.0).
def randint(a:int,b:int)->int:...
Return a random integer in the range [a, b], including both end points.
def randrange(start:int,stop:int,step:int)->int:...
Return a randomly-selected element from range(start, stop, step).
def seed(a:int)->None:...
Initialize the random number generator.
def uniform(a:float,b:float)->float:...
Return a random float in the range [a, b).