from datetime import datetime # Prints a line on the stdout prepended with the time def log(msg): print(f'[{datetime.now()}] {msg}')