+ 4
Colored Output in Python
https://sololearn.com/compiler-playground/ckubkU1SQpUw/?ref=app In general, how can I make a python codeâs output colored? Specifically in my code, how can I make the letters in output colored? Especially I want only the characters to be colored, while the â-â signs to be left as they are.
4 Answers
+ 7
Levon Hovsepyan the easiest way on sololearn is to use
open('.png','w').write('')
And then style as you would on any natural html document.
https://sololearn.com/compiler-playground/clhZHyRf59J6/?ref=app
+ 2
https://pypi.org/project/colorama/
you could try this, although i don't believe it works in the sololearn code playground
+ 2
you can also make it bold using BroFar 's method
print('<strong>hello</strong>')
open('.png','w').write('')
print('''<style>img{display:none;}</style>''')
+ 1
okkarsoe matthew if you were working on a in-lesson playground you can click on 'reset' from options to get the template back.
I don't think there's a way to get back written code if it's deleted though.
You can try looking for it by going to 'my code bits' and see if you can find what you want there.
Also create a new question for this so people can help you out.