![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python3
zilin1995
这个作者很懒,什么都没留下…
展开
-
简单的反转词典的代码实现
reversed_dictionary = dict(zip(dictionary.values(), dictionary.keys()))原创 2018-12-21 16:21:54 · 371 阅读 · 0 评论 -
random生成随机数
random.random():返回随机生成的一个实数,它在[0,1)范围内random.uniform(a,b)::用于生成一个指定范围内的随机浮点数random.randint(a,b):用于生成一个指定范围内的整数random.randrange([start],stop[, step]):从指定范围内,按指定基数递增的集合中获取一个随机数random.choice(sequence...原创 2018-12-21 19:23:43 · 426 阅读 · 0 评论