Ask coding questions

← Back to all posts
Help Me WIth This
pythoncoderNYC (0)

Hey guys! Umm this is my 1st time using, and I can't figure out how to set a text color using Python (Without Turtle). Chat to me the answer.

Thanks, pythoncoderNYC

Geocube101 (246)

You must use a color module (like termcolor)

#Import termcolor module
import termcolor as t

#Print colored text
t.cprint('Hello World', color)
t.print(colored('Hello World', color))