'How to color an int variable in Python?
I am using Colorama to color strings in my code. Is there a way to color an int variable?, for example:
I want to color this part with a different color "~--( Round: 1 )--~". I tried to color the variable Rounds, so I convert it to a string, but It doesn't work.
Cards = 13
Rounds = 0
while Cards > 0:
Rounds +=1
RoundsColor = (Rounds, Fore.RED)
print(Fore.BLUE+Back.WHITE+Style.BRIGHT + "*********************************************** ~--( Round:", RoundsColor, Fore.BLUE+Back.WHITE+Style.BRIGHT + ")--~ ***********************************************")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
