rot13简单加密,rot13加密,def rot13(s,


def rot13(s, OffSet=13):    def encodeCh(ch):        f=lambda x: chr((ord(ch)-x+OffSet) % 26 + x)        return f(97) if ch.islower() else (f(65) if ch.isupper() else ch)    return ''.join(map(encodeCh,s))  s='Hello!'  print rot13(s)              # Uryyb!  print rot13(rot13(s))       # Hello!  print rot13(s,26)           # Hello!#该片段来自于http://byrx.net

评论关闭