title: How can I return colored text in a function without having to print it in python?
body: <p>I am trying to output colored text onto a webpage and I am stumped as I observed that we can get colored text only by printing and not by returning. But I need to return colored text for my purposes. This is the output I got on running print and function. <a href="https://i.stack.imgur.com/qt64R.png" rel="nofollow noreferrer">pic</a>. Can anyone suggest how I could possibly return colored text?</p>