random模块 随机模块 random 的方法: print(random.random()) # [0,1] 的浮点数 print(random.randint(1,3)) print(random.randrange(1,3)) print(random.choice([11,22,33])) print(random.sample([11,22,33,44,55],2)) print(random.uniform(1,4)) item=[1,2,3,4,5,6] random.shuff…