吳若靖PYTHON的ord與chr等於unicode與

 one = "一"

print(one,'的型態',type(one)) print(one, "的字碼", ord(one)) for i in range(19968,20000): 

print(i,'的字元',chr(i))


a ="一" #ord相當excel=UNICODE

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

#chr相當excel=UNICHAR

for i in range(19968,20000):

print(chr(i))


XFD 16384

24,6,4 16384

1048576 1048576



一 19968
19968 一
19969 丁
19970 丂
19971 七
19972 丄
19973 丅
19974 丆
19975 万
19976 丈
19977 三

留言

  1. 911可以練習活用html模式。https://ruojinnng.blogspot.com/2026/09/pythonordchrunicode.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

吳若靖Python產生金融常識Javascript測驗網頁

吳若靖EXCEL公式Formulas

吳若靖python集合set字典dict統計字元數目37,241不同字元數目1,251