diff --git a/Lesson_2/We know/dumb_decryptor.py b/Lesson_2/We know/dumb_decryptor.py index 9ca2e56..52ffcb5 100644 --- a/Lesson_2/We know/dumb_decryptor.py +++ b/Lesson_2/We know/dumb_decryptor.py @@ -5,6 +5,7 @@ # Return codes: # 0 - OK -import codecs +rot13 = str.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', + 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm') -print(codecs.encode(input("Enter message: "), "rot13")) +print(input("Enter message: ").translate(rot13))