【发布时间】:2019-06-06 17:23:06
【问题描述】:
from colorama import Fore, Back, Style
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')
输出
[31msome红色文字
[42mand 有绿色背景
[2mand indim text
[0米
现在恢复正常
我使用 colorama 库来更改几个单词的字体颜色。不幸的是,它没有返回任何带有各自颜色的行。任何人都可以帮我确定问题吗?在此先感谢
【问题讨论】: