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


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


2 Answers

New Answer


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.