Answers for "python terminal colour text"

1

python print to terminal with color

from termcolor import colored
print colored('hello', 'red'), colored('world', 'green')
Posted by: Guest on December-16-2020
4

how to color print in python

#pip install termcolor
from termcolor import cprint

cprint('Hello, World! In yellow highlighted in red!', 'yellow', 'on_red')
cprint('Hello, World! Underlined in red!', 'red', attrs=["underline"])
Posted by: Guest on February-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language