Colour of the text | SoloLearn: Learn to code for FREE!

0

Colour of the text

Can I change the colour of the output text in Python? If I can, how? Thanks you.

4/3/2018 7:04:12 AM

Moncapiten

2 Answers

New Answer

+2

Generally the outputs are in terminal. You can Try :- import colorama from colorama import Fore, Back, Style colorama.init() text = "The quick brown fox jumps over the lazy dog" print(Fore.RED + text) print(Back.GREEN + text + Style.RESET_ALL) print(text) This will work on Terminal but not in Sololearn.

0

Thanks