2017年11月8日

random模块

摘要: print(random.randint(1,8)) #包含8print(random.choice('hello'))print(random.choice(['123',4,[1,2]]))print(random.shuffle('hello'))print(random.sample(['1 阅读全文

posted @ 2017-11-08 13:45 新的米 阅读(147) 评论(0) 推荐(0) 编辑

time模块

摘要: import time print(help(time)) print(time.time()) #时间戳 ***** time.sleep() ***** print(time.clock()) #计算CPU执行时间 print(time.gmtime()) #机构化时间 time.struct_ 阅读全文

posted @ 2017-11-08 12:47 新的米 阅读(180) 评论(0) 推荐(0) 编辑

导航