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()
Please call me JiangYouDang!
python内建函数,参数一个字符。如果是字母,返回ASCII吗,如果是非ASCII字符,返回unicode编码
1 def test_ord(): 2 print(ord('a')) 3 print(ord('A')) 4 print(ord('官')) 5 6 7 test_ord()