Python笔记之random模块!
#random模块import randomimport stringprint(random.randint(10,100)) print(random.randrange(10,100,5)) #数字5是步长print(random.random()) #返回随机浮点数print(random.choice('asdasdafafaf')) #返回字符串的随机一个print(random.sample(range(1,31),5)) #从多个对象中随机返回指定个对象p