0
from rich import print
from rich.console import Console
console = Console()


#example 1
print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals())

#example 2
console = Console()
print("Hello, [bold magenta]World[/bold magenta]!", "")
console.print("Hello", "World!", style="bold red")

#example 3
print(f"I wonder what this looks like 1 + 1 = {1 + 1}")
print({"a": [1, 2, 3], "b" : {"c" : 1}})


#example 4
console.print("This is some text.")
console.print("This is some text.", style="bold")
console.print("This is some text.", style="bold underline")
console.print("This is some text.", style="bold underline red")
console.print("This is some text.", style="bold underline red on black")
 
#example 5
console.print(":thumbs_up: File downloaded!")

input("")

所以当我运行它时我得到我没有得到什么是错误请帮助我对这些主题很困惑所以我不知道错误是什么

在此处输入图像描述

4

1 回答 1

0

经典的 Windows 控制台对表情符号没有很好的支持。如果您安装新的Windows 终端,您会发现您的表情符号将按预期显示。

于 2022-02-21T11:54:32.007 回答