loading...

Print coloured text in python

oxy_oxide profile image Hamza Hesham ・1 min read

Hello,Today we will print coloured text in python.
First, we will install ansi-colours moudle.

pip install ansi-colours

After installing we will import ansi-colours as colour
then print your sentence after choosing the color.

from ansi_colours import AnsiColours as colour
print(colour.red('Follow') + colour.blue('ME!'))

Alt Text
Buy Me A Coffee
twitter:https://twitter.com/Oxy_oxide
buy me a coffee : https://www.buymeacoffee.com/Oxyoxide
Don't forget to follow me.
Thanks for reading.

Discussion

markdown guide
 

colored is a nice library for colorized text as well

 

Nice post but colorama is better than this one.