Is it possible to print using different colors in ipython's Notebook?

后端 未结 12 1154
孤独总比滥情好
孤独总比滥情好 2020-12-23 09:15

Is it somehow possible to have certain output appear in a different color in the IPython Notebook? For example, something along the lines of:

 print(\"Hello          


        
12条回答
  •  既然无缘
    2020-12-23 09:40

    colorama makes it dead easy:

    from colorama import Fore
    print(Fore.RED + "this is red")
    

提交回复
热议问题