I'm new to programming and this is the first roadblock that I've stumbled upon. I saw this piece of code in a TikTok video. I'm confused; I didn't know you can have colorful outputs in VS Code! Do I have to import a file or something to be able to use the colors? I don't really understand what the back.Red
or the Fore.YELLOW
functions mean, it would be appreciated if someone could explain. Thank you!
colours = [
Back.RED, Back.GREEN,
Back.CYAN, Back.MAGENTA
]
yel = Fore.YELLOW
emojis = ['', '', '']
while True :
for n in emojis:
for back in colours:
print(back+yel, end ='')
print(' coding!', n )
sleep(0.5)