Python function for datetime


Topic: Python function for datetime

Solution

from datetime import datetime
datetime.utcnow()
def log(msg, *, dt = datetime.utcnow()):
    print(f'Message at {dt} was {msg}')



List all Python Programs