python ascii码转换字母大小写

def r(f):
if ord(f) in range(97,122):
print(chr(ord(f)-32))

r('f')

def f(r):
if ord(r) in range(65,91):
print(chr(ord(r)+32))
f('Z')
原文地址:https://www.cnblogs.com/xuanyue/p/6008505.html