4/25

用python删除文件和用linux命令删除文件方法

python:os.remove(文件名)

linux:       rm  文件名

log日志中,我们需要用时间戳记录error,warning等的发生时间,请用datetime模块打印当前时间戳 “2018-04-01 11:38:54

顺便把星期的代码也贴上了

import time

a=time.localtime()

print(a)

time.asctime(time.localtime())

                                


   random.random():生成从0-1之间的随机数

 random.randint():生成指定范围内的整数

  random.uniform():生成指定范围里的随机浮点数                     

原文地址:https://www.cnblogs.com/coder-2017/p/8946676.html