我想更改文本的颜色。当然我不想为我的程序制作GUI。我只想为 Terminal 这样做。作为示例,请更改此:
print("Hello SO !")
最佳答案
- 安装
pip install termcolor
运行此代码:
from termcolor import colored print(colored("Hello world in red style!", 'red'))
使用 Windows powershell 或 unix shell
关于python - 如何在 python 2.7.3 中更改文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19045137/