Apr-15-2020, 08:40 PM
Hi,
I want to create a variable, and when I print that variable, it needs to be in a certain color. This is my current code
I want to create a variable, and when I print that variable, it needs to be in a certain color. This is my current code
import datetime from colored import fg, attr current_time = datetime.datetime.now().strftime('%H:%M:%S') % (fg(151), attr(0)) print(current_time)
Error:Traceback (most recent call last):
File "C:/Users/Julius/PycharmProjects/Fenix/venv/Grosbasket script.py", line 8, in <module>
current_time = datetime.datetime.now().strftime('%H:%M:%S') % (fg(151), attr(0))
TypeError: not all arguments converted during string formatting
How do I solve this error?