level1:

def caser(s):
raw_str="abcdefghijklmnopqrstuvwxyz"
new_str="cdefghijklmnopqrstuvwxyzab"
result = ""
for i in s:
if i in raw_str:
index = raw_str.index(i)
result += new_str[index]
else:
result += " "
return result
if __name__ == '__main__':
s = input("Enter a string: ")
print(caser(s))`
运行后得到i hope you didnt translate it by hand thats what computers are for doing it in by hand is inefficient and that s why this text is so long using string maketrans is recommended now apply on the url
可知url为map.html。
输入map运行,得到ocr。
使用maketrans()
def trans_str(s):
inword = 'abcdefghijklmnopqrstuvwxyz'
outword = 'cdefghijklmnopqrstuvwxyzab'
transtab = str.maketrans(inword, outword)
new_str = s.translate(transtab)
return new_str
if __name__ == '__main__':
s = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw " \
"rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj"
print(trans_str(s))
s1 = 'map'
print(trans_str(s1))