ord chr python获取字母index

if __name__ == '__main__':
    for i in range(100):
        print("{0}/{1}".format(i, chr(i)))

    a = 'a'
    index = ord(a)
    index -= 32
    b = chr(index)
    print(b)
文章目录