vendredi 30 mars 2018

How to get the real time while opening and closing the file in python?

I need the real time while opening and closing the file. Also i have used

#####
file1 = open("file.txt",mode="r+")
file1.close()
if (file1.close()==True):
    print(datetime.datetime.now())

it is not showing the output.

Aucun commentaire:

Enregistrer un commentaire