Believe in yourself.

摘要: 一、random模块 1、random.random(): 返回0-1之间的随机浮点数 2、random.uniform(a,b): 返回限定范围的随机浮点数,a和b可以是浮点数,也可以是整数 3、random.randint(a,b): 返回限定范围内的整数,包括a和b 4、random.rand 阅读全文
posted @ 2018-06-17 22:47 eastonliu 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 一、time模块 1、时间戳 time.time() :从1970-01-01到至今的秒数 2、等待 time.sleep(seconds):等待second秒 3、计算CPU的执行时间 time.clock():统计CPU工作的时间 4、打印UTC时间 time.gmtime(seconds=No 阅读全文
posted @ 2018-06-17 21:55 eastonliu 阅读(1154) 评论(0) 推荐(0) 编辑