$ ls ~yifei/notes/

python random library

Posted on:

Last modified:

Basic Usage

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

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

© 2016-2022 Yifei Kong. Powered by ynotes

All contents are under the CC-BY-NC-SA license, if not otherwise specified.

Opinions expressed here are solely my own and do not express the views or opinions of my employer.