python ord()函数

python内建函数,参数一个字符。如果是字母,返回ASCII吗,如果是非ASCII字符,返回unicode编码

1 def test_ord():
2     print(ord('a'))
3     print(ord('A'))
4     print(ord(''))
5 
6 
7 test_ord()

 

posted on 2025-12-27 17:44  luckygxf  阅读(0)  评论(0)    收藏  举报

导航