【发布时间】:2023-03-14 00:45:01
【问题描述】:
我正在尝试像这样打印 ascii 艺术:
print(("""\
._ o o
\_`-)|_
,"" \
," ## | ಠ ಠ.
," ## ,-\__ `.
," / `--._;)
," ## /
," ## /
""").encode('utf-8'))
而且输出看起来完全不正确。
打印ascii艺术的正确方法是什么?
【问题讨论】:
-
使用换行符?
\n -
这是什么 Python 版本?
-
我使用的是 Python 3.4。
-
输出是什么样子的?
-
使用 PyPi 的 python ASCII 艺术 - 链接 pypi.org/project/art/">here</a>。(没有足够的声誉来评论,除非回复。)
标签: python python-3.x printing utf-8 ascii