李宜萱PYTHON的ord與chr等於unicod

a ="一" #ord相當EXCEL函數
print(a,"的字碼",ord(a))
for i in range(19968,20000):
	print(i,"字元",chr(i))
	=UNICODE(A1048570)	
一	19968	的字碼
19968	一	
19969	丁	
19970	丂	
19971	七	
19972	丄	
19973	丅	

以上html模式以下撰寫模式

 a ="一" #ord相當EXCEL函數

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

#chr相當excel函數=UNICODE

for i in range(19968,20000):

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

</PRE>


一 19968 的字碼

19968 一

19969 丁

19970 丂

19971 七

19972 丄

19973 丅


留言

  1. 911商業軟體,unicode.https://glacier0831.blogspot.com/2026/09/pythonordchrunicod.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

李宜萱python集合set字典dict統計字元數目37,241不同字元數1,251

李宜萱excel字串處理產生金融市場常識