If you’re a just beginning with Python programming or still a novice, here is a great tutorial on Python Colorama Tutorial that helps you in getting a Colored Output in Python by importing Colorama Library and using it in terminal to get coloured output.
In this tutorial first import foreground,background,style and initialize from colorama.
Now turn on auto reset.
Fore is used to change text color and back is used to change the background color of the text. The style is used to change style (i.e. Dim, Normal, and Bright). Code for the same will be as follows:
Try this and let us know about your experience with Python in the comment section below.
Colored Output in Python | Python Colorama Tutorial
from colorama import Fore,Back,Style,init
print("This is normal") print(Fore.BLACK+Back.WHITE+"This is reversed") print(Fore.WHITE+Back.RED+Style.BRIGHT+"Alert!!!") print(Fore.WHITE+Back.YELLOW+"Alert!!!")