str=input("请输入一个大写字母:")
if str>="A"and str<="Z":
x=chr(ord(str)+32)
y=ord(str)+32
print("小写字母为:",x)
print("ASCLL值为:",y)
将大写字母转换为小写字符串,并显示 ASCII 值。
最新推荐文章于 2023-08-05 19:29:24 发布
str=input("请输入一个大写字母:")
if str>="A"and str<="Z":
x=chr(ord(str)+32)
y=ord(str)+32
print("小写字母为:",x)
print("ASCLL值为:",y)