Print several sentences with different colors
问题 I'm trying to print several sentences with different colors, but it won't work, I only got 2 colors, the normal blue and this red import sys from colorama import init, AnsiToWin32 stream = AnsiToWin32(sys.stderr).stream print(">>> This is red.", file=stream) 回答1: As discussed in the comments, change your code to use these features; import os, colorama from colorama import Fore,Style,Back colorama.init() print(Fore.RED + 'some red text') print(Back.GREEN + 'and with a green background') print