python random library


Author: yifei / Created: May 30, 2017, 11:09 a.m. / Modified: May 30, 2017, 11:10 a.m. / Edit

Basic Usage

random.randrange(start, stop, step)
random.randint(a, b)
random.random()

random.choice(seq)
random.shuffle(seq)
random.sample(seq, k)

评论区