xxxxxxxxxx
pip install simple_colours
from simple_colors import *
print(green('hello', 'bold'))
xxxxxxxxxx
class color:
BOLD = '\033[1m'
END = '\033[0m'
print(color.BOLD + 'Hello World !' + color.END)
xxxxxxxxxx
from __future__ import unicode_literals, print_function
from prompt_toolkit import print_formatted_text, HTML
print_formatted_text(HTML('<b>This is bold</b>'))
print_formatted_text(HTML('<i>This is italic</i>'))
print_formatted_text(HTML('<u>This is underlined</u>'))
bold text python
xxxxxxxxxx
def say(text: str):
print ("\033[1;37m" + text)
say("Hello, world!")