uRLStringConstant = "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."
listSet=[]
for i in uRLStringConstant:
convertedValue = ord(i) +2
if convertedValue > 122:
convertedValue = 97
if convertedValue == 34:
convertedValue = 32
if convertedValue == 48:
convertedValue = 46
convertedCharater = chr(convertedValue)
listSet.append(convertedCharater)
print '[%s]' % ''.join(map(str, listSet))
Output was:
:::::OUTPUT::::::
Using 'map', we convert it to 'ocr'
Hence the URL is http://www.pythonchallenge.com/pc/def/ocr.html
More suggestion are always welcome. In case if you wish me to write about any specific scenario, please feel free to write to me or else you can Comment below.
No comments:
Post a Comment