Rot13 “cipher” in #Python
#!/usr/bin/python3
import sys, string
def rot13(s):
return ''.join([chr(x.islower() and ((ord(x) - 84) % 26) + 97
or x.isupper() and ((ord(x) - 52) % 26) + 65
or ord(x))
for x in s])
for line in sys.stdin:
sys.stdout.write(rot13(line))
Rot13
This entry was posted in Uncategorized. Bookmark the permalink.