Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to output python with color

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces python how to take color output, the article is very detailed, has a certain reference value, interested friends must read it!

Format:\ 033 [display mode; foreground color; background color m

Description:

Foreground color background color

-

30 40 black

31 41 Red

32 42 Green

33 43 shades

34 44 Blue

35 45 purplish red

36 46 turquoise

37 47 White

Display mode meaning

-

0 terminal default settings

1 highlight

4 use underscore

5 flicker

7 anti-white display

8 not visible

Example:

\ 033 [1x 31x 40m 1: highlight 31: foreground color red 40: background color black-

\ 033 [0m uses the terminal default setting, that is, cancels the color setting

Generally, the output font color is set to\ 033 [31 [31] 1m highlighted text content\ 033 [0m]

The above is all the content of the article "how to output python with Color". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report