Skip to content
Advertisement

How do I use colorama inside a tuple?

I’m trying to change individual existing lines inside an existing tuple. Example:

JavaScript

I want ID to be one color, Name, Age, Condition, Medicine, Temperament, and Adoptable to be a different color.

I can’t figure out how to enter the escape codes for color inside the existing tuple. Help!

Advertisement

Answer

You need to prepend Fore.<COLOR> and preferably append Style.RESET_ALL to every element you want to style.

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement