ord()
和chr()
,unichr()
相反ord('A')
: ‘A ‘ —> 65ord(u'\u2020')
: return 8224chr(65)
: 65 —> AASCII code for ‘A’ is 65, ‘a’ is 97
1 | 'A') ord( |
Note:
if {A:1, B:2, ….}
ord('A')-64
注意最开始A为65,如果设定A为1,则 - 64
ord()
和chr()
, unichr()
相反
ord('A')
: ‘A ‘ —> 65
ord(u'\u2020')
: return 8224
chr(65)
: 65 —> A
ASCII code for ‘A’ is 65, ‘a’ is 97
1 | 'A') ord( |
Note:
if {A:1, B:2, ….}
ord('A')-64
注意最开始A为65,如果设定A为1,则 - 64