Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Python中打印ANSI/UNICODE特殊字符_Python_Unicode_Ansi - Fatal编程技术网

在Python中打印ANSI/UNICODE特殊字符

在Python中打印ANSI/UNICODE特殊字符,python,unicode,ansi,Python,Unicode,Ansi,我已经用谷歌搜索了30分钟,但找不到答案 我如何自己打印这些字符?(我想避免使用诅咒等) 这有助于您在问题中输入的表格的轴上有Unicode数字 >>> print u'\u2550\u2551\u2552' ═║╒ >>> for y in range(0x2500, 0x2580, 0x10): print u' '.join(unichr(x) for x in range(y, y+0x10)) ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊

我已经用谷歌搜索了30分钟,但找不到答案

我如何自己打印这些字符?(我想避免使用诅咒等)

这有助于您在问题中输入的表格的轴上有Unicode数字

>>> print u'\u2550\u2551\u2552'
═║╒

>>> for y in range(0x2500, 0x2580, 0x10):
    print u' '.join(unichr(x) for x in range(y, y+0x10))

─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟
╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯
╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿