Python——random模块2017-10-20 本文已影响0人 So_ProbuING random 随机数 randint(range) 生成范围内的随机数 random.randint(1,8)生成1-8的随机数 包括8 randrange(range) 不包含最后 choice(str) 随机选择字符 sample(str,numer) 在str序列中随机选择number个元素