【问题标题】:Is there a way to change the printed string in python [duplicate]有没有办法改变python中的打印字符串[重复]
【发布时间】:2021-12-28 05:11:58
【问题描述】:

有没有办法在 python 示例print("Hello world") 中更改打印文本的颜色,并在打印时将其颜色更改为蓝色

【问题讨论】:

标签: python python-3.x colors


【解决方案1】:
pip install termcolor
#https://pypi.org/project/termcolor/

from termcolor import colored 

print(colored("Jello World!", 'green'))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-08
    • 2011-09-05
    • 2019-11-14
    • 2021-12-08
    • 2019-10-26
    • 1970-01-01
    • 2018-12-07
    • 2018-05-09
    相关资源
    最近更新 更多