Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3.6
- word = input("Введите фразу:\n")
- shift = 3 # Сдвиг
- encode = "".join([chr(ord(x) + shift) for x in word])
- print("\nЗашифровано:\n" + encode + "\n")
- decode = "".join([chr(ord(x) - shift) for x in encode])
- print("Дешифровано:\n" + decode + "\n")
Add Comment
Please, Sign In to add comment