问题是这样的,我的想法是这样的
str="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
l=input()
n=list(l)
while len(n)!=0:
if eval(n[:2])<27:
print(str[eval(n[0:2])-1],end="")
n.remove(0,1)
else:
n.remove(0)
print(str[eval(n(0)-1)],end="")
问题是这样的,我的想法是这样的
str="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
l=input()
n=list(l)
while len(n)!=0:
if eval(n[:2])<27:
print(str[eval(n[0:2])-1],end="")
n.remove(0,1)
else:
n.remove(0)
print(str[eval(n(0)-1)],end="")
l = '12324252'
while l:
if int(l[:2]) < 27:
print(chr(int(l[:2])+64), end="")
l = l[2:]
else:
print(chr(int(l[:1])+64), end="")
l = l[1:]