0

Colour of the text

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

3rd Apr 2018, 7:04 AM
Moncapiten
Moncapiten - avatar
2 Respostas
+ 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.
3rd Apr 2018, 7:38 AM
SatyaJit Pradhan
SatyaJit Pradhan - avatar
0
Thanks
3rd Apr 2018, 8:17 AM
Moncapiten
Moncapiten - avatar