字符串输出颜色,字体颜色,背景色
方式一:封装好的类
from colorama import Fore#字体颜色 from colorama import Back#背景色 from colorama import Cursor#还没研究 from colorama import Style#还没研究 print(Fore.MAGENTA + "AAAAAA") print(Fore.BLUE + "AAAAAAAAAAAA") print(Back.BLACK + "AAAAAAAAA")
方式二:(别用他,太垃圾了)
\033[1;31;40m # 1是显示方式(可选),31是字体颜色,40m 是字体背景颜色;
\033[0m # 恢复终端默认颜色,即取消颜色设置;
-----------------------------------------------------------------------------------------------------------------------------------------