Is there any python equivalent for perl\'s
print color \'red\';
print ;
print color \'reset\';
available in python?
<
Color_Console library is comparatively easier to use. Install this library and the following code would help you.
from Color_Console import *
ctext("This will be printed" , "white" , "blue")
The first argument is the string to be printed, The second argument is the color of
the text and the last one is the background color.
The latest version of Color_Console allows you to pass a list or dictionary of colors which would change after a specified delay time.
Also, they have good documentation on all of their functions.
Visit https://pypi.org/project/Color-Console/ to know more.