+ 1
How to Color a word in a string. PYTHON 3
I want to color some words from a string, for example: str = "this is my string, is good"; If the user's input is "is", I want to print the whole str again, but with the "is" colored, for example, the first "is" is colored with red and the second "is" is colored with green, but I don't know how to do it... Is there a way to do it? can I use coloroma to achieve this?
2 Respuestas
+ 1
most console outputs just have one set font color. you might be able to import some graphic libraries and then use those, but i'm not too familiar with it.
0
Jan Markus I tried to use, but it doesn't work in python 3... :(