如果你想Python代码,你可以使用彩色的,这里的例子,其中您选择字体颜色和背景颜色。from colored import fg, bg, attrcolor = fg('#C0C0C0') + bg('#00005f') # create font and background colorres = attr('reset') # adding that to string that we print reset current colorsprint(color + "Hello World !!!" + res)