Can I write italics to the Python shell?

后端 未结 3 1791
难免孤独
难免孤独 2021-01-02 05:02

Is it possible to write something like this:

>>> text_output = \"Hello World.\"
>>> print text_output

...where if the tex

3条回答
  •  粉色の甜心
    2021-01-02 05:30

    No. The print function outputs to sys.stdout by default. Assuming you're using something like IDLE, this will simply be echoed into IDLE. You can set some options in IDLE itself to show different font faces and sizes and whatnot, but this will modify everything, not just the output of print commands.

提交回复
热议问题