我想得到一个角色,它的ASCII价值.
ASCII
例如,对于角色a,我想得到97,反之亦然.
a
97
python integer type-conversion char
我正在尝试在 python 3.3.3 中创建一个程序,该程序将接受一个字符串,然后将其转换为数字 (1-26)
我知道如何为一位数而不是 2 位做这件事
translist = str.maketrans("123456789", "ABCDEFGHI")
有没有办法做到这一点
python string translate python-3.x
python ×2
char ×1
integer ×1
python-3.x ×1
string ×1
translate ×1
type-conversion ×1