DEV Community

Basha
Basha

Posted on

How to get the Last modification date of a file in python?

It is very easy to get it

import os
print("Last modification" + time.ctime(os.path.getmtime(file_dr)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API