Python/ciphers/Atbash.py
Anup Kumar Panwar f56dd7f8e3
Update Atbash.py
2019-05-26 22:59:07 +05:30

15 lines
363 B
Python

def Atbash():
inp=raw_input("Enter the sentence to be encrypted ")
output=""
for i in inp:
extract=ord(i)
if extract>=65 and extract<=90:
output+=(unichr(155-extract))
elif extract>=97 and extract<=122:
output+=(unichr(219-extract))
else:
output+=i
print (output)
Atbash() ;