python windows get file modified date

Solutions on MaxInterview for python windows get file modified date by the best coders in the world

showing results for - "python windows get file modified date"
Ayana
08 Oct 2020
1# note: test.txt can also be a file path
2import os.path, time
3print("Last modified: %s" % time.ctime(os.path.getmtime("test.txt")))
4print("Created: %s" % time.ctime(os.path.getctime("test.txt")))