Reverse Cipher
The reverse cipher encrypts by printing the characters in reverse order. For example “my howercraft is full of eels” becomes “slle fo lluf si tfarcrewoh ym To decrypt the message we simply reverse again. This is a weak cipher.
Implementation
reverse.py
1message = "my howercraft is full of ells"
2translated = ""
3
4i = len(message) - 1
5while i >= 0:
6 translated += message[i]
7 i -= 1
8
9# # Method 2
10# translated = "".join([message[-1*(i+1)] for i in range(len(message))])
11
12print(translated)