A silly caesar cipher thing
This commit is contained in:
parent
59b9b57974
commit
159b0ae613
24
local/bin/caesar
Executable file
24
local/bin/caesar
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
def main(sysargs=sys.argv[:]):
|
||||
d = {}
|
||||
for c in (65, 97):
|
||||
for i in range(26):
|
||||
d[chr(i+c)] = chr((i+13) % 26 + c)
|
||||
|
||||
print(
|
||||
"".join([
|
||||
d.get(c, c) for c in " ".join(sysargs[1:])
|
||||
]),
|
||||
end=""
|
||||
)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
Loading…
Reference in New Issue
Block a user