import datetime import time print(time.strftime("%Y-%m-%d", time.localtime()))