How do I color a string in python terminal?
Question:
I am trying to color only a single variable in Python 3, however whenever I run the code, the sring gets colored in my terminal, but then everything else after that is colored too. I am trying to do it without any imports. Here’s my code.
tentativas = 20
print(f'Tentativas restantes:', f' 33[0;36m {tentativas}')
Answers:
To reset the coloring you have to use "
I am trying to color only a single variable in Python 3, however whenever I run the code, the sring gets colored in my terminal, but then everything else after that is colored too. I am trying to do it without any imports. Here’s my code.
tentativas = 20
print(f'Tentativas restantes:', f' 33[0;36m {tentativas}')
To reset the coloring you have to use "