📜  以粗体或颜色打印特定部分并结束. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:52.604000             🧑  作者: Mango

代码示例1
class color:
   PURPLE = '\033[95m'
   CYAN = '\033[96m'
   DARKCYAN = '\033[36m'
   BLUE = '\033[94m'
   GREEN = '\033[92m'
   YELLOW = '\033[93m'
   RED = '\033[91m'
   BOLD = '\033[1m'
   UNDERLINE = '\033[4m'
   END = '\033[0m'

print(color.BOLD + 'Hello World !' + color.END)