余佰晏PYTHON的ord與chr等於unicode與unichar
<PRE> STYLE="BORDER:5PX RED SOLID">
a ="一"#ord相當EXCEL函數=UNICODE #python可以使用單或雙表示字元
print(a,"的字碼",ord(a))
#chr相當EXCEL函數=UNICHAR
for i in range(19968,20000):
print(i,"字元",chr(i))
</PRE>
<PRE STYLE="BORDER: SOLID PINK 6PX;FONT-SIZE:1.2EM">
#python常用的內建函數print, type, ord字碼, chr字元,chr代表character one = "一" print(one,'的型態',type(one)) print(one, "的字碼", ord(one)) for i in range(19968,20000): print(i,'的字元',chr(i))
918商業軟體。https://yubaiyan.blogspot.com/2026/09/excekfindlenleftmidrightpowerunicharuni.html
回覆刪除911商業軟體,要在html模式下貼上,PRE STYLE="BORDER: SOLID PINK 6PX;FONT-SIZE:1.2EM"才會有作用。https://yubaiyan.blogspot.com/2026/09/blog-post.html