def message(text_m,color_m) :
if(color_m == "RED"):print("\033[0;31;31m"+text_m+"\033[0m")
elif(color_m == "GREEN"):print("\033[0;32;32m"+text_m+"\033[0m")
elif(color_m == "YELLOW"):print("\033[0;32;32m"+text_m+"\033[0m")
elif(color_m == "BLUE"):print("\033[0;34;34m"+text_m+"\033[0m")
else:print(text_m)
phython3 打印带颜色的字
最新推荐文章于 2023-03-24 15:14:13 发布