廖怡婷PYTHON的ord與chr等於unicode與unichar

使用html指令與css指令

<PRE STYLE="BPRDER: SOLID PINK 6PX;FONT-SIZE:1

a="一" #python可以使用單或雙表示字元

print(a,"的字碼",ord(a))

for i in range(19968,20000):

print(i,"字元",chr(i))

</PRE>

<PRE STYLE="BPRDER: SOLID PINK 6PX;FONT-SIZE:1

          =UNICODE(A1048570)

一      19968           的字碼

19968    一

19969    丁

19970    ㄎ

19971    七

19972   

19973     ㄒ

19974     ㄏ



留言

  1. 918商業軟體,跟著進度走,必然成長!https://yiting111.blogspot.com/2026/09/excelfindlenleftmidrightpowerunicheruni.html
    914要在html模式貼上才能執行。https://yiting111.blogspot.com/2026/09/pythonjavascript.html
    911要在html模式PRE STYLE="BPRDER: SOLID PINK 6PX;FONT-SIZE才能發揮作用。https://yiting111.blogspot.com/2026/09/pythonordchrunicodeunichar.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

廖怡婷PYTHON集合ste字典dict統計字元數目37,241不同字元數1,251