How do I print bold text in Python?


Question

How do I print bold text in Python?

For example:

print "hello"

What should I do so that the text “hello” is displayed in bold?

1
112
12/10/2014 8:33:59 AM

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)
267
8/28/2019 12:07:32 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon