Better Print Statement

Better Print Statement

I’d like each print statement to look more like a log, so the timestamp and user would be a great addition to each new line.

Timestamp

Imports

from time import sleep, asctime, localtime
print(f"{asctime(localtime())}: {''.join(log)}")

Validation

Better Print Output

User

Imports

from os import getlogin
print(f"{getlogin()} -- {asctime(localtime())}: {''.join(log)}")

Validation

User Better Print Output

Even better.

Source Code Snapshot

GitHub repo at this point in time