import datetime def print_with_time(*args): timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") print(f"{timestamp}: ", *args)