林宏恩PYTHON的ord與chr等於unicod
<PRE STYLE="BORDER: SOLID PINK 6PX;FONT-SIZE:1.2EM">
a=’一’
print(a, "的字碼”,ord(a))
for i in range(19968,20000):
print(i,'字元”,chr(1))
</PRE>
|
19968 |
|
字元 ㄧ
|
|||
|
19969 |
|
字元丁 |
|||
|
199元o |
|
宇元ㄎ |
|||
|
19971 |
|
字元七 |
|||
|
19972 |
|
字元丄 |
|||
|
19973 |
|
字元T |
Google「林宏恩python」找到這個網頁。https://linhongen.blogspot.com/2026/11/python.html
回覆刪除912,必須在html模式下才能正確呈現。https://linhongen.blogspot.com/2026/09/pythonordchrunicod.html