4/25

Delete file with python and delete file with linux command method

python: os.remove(filename)

linux: rm filename

In the log log, we need to use the timestamp to record the occurrence time of error, warning, etc. Please use the datetime module to print the current timestamp " 2018-04-01 11:38:54 "

By the way, I also posted the code of the week

import time

a=time.localtime()

print(a)

time.asctime(time.localtime())

                                


 

   random.random(): Generate random numbers from 0-1

 random.randint(): Generate integers in the specified range

  random.uniform(): Generate random floating point numbers in the specified range                     

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324854852&siteId=291194637