pythonchallenge关卡破解

第一关:pow(2,38)

第二关:

1 import string
2 table = str.maketrans(string.ascii_lowercase, string.ascii_lowercase[2:] + string.ascii_lowercase[:2])  #向右移动两位
3 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. "
4 print(s.translate(table))

运行后结果: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.

第三关:

import re
s='''     '''
rule = re.compile('[a-zA-Z]')
result=rule.findall(s)
print(result)

第四关:

import re
s='''    '''    
rule = re.compile('[^A-Z][A-Z][A-Z][A-Z]([a-z])[A-Z][A-Z][A-Z][^A-Z]')
result=rule.findall(s)
print(result)

第五关:

 

posted on 2015-12-17 22:24  小门  阅读(162)  评论(0编辑  收藏  举报

导航