Advertisement
DiYane

Caesar cipher

Sep 26th, 2023
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def caesar_cipher(string):
  2.     result = ''
  3.     for char in string:
  4.          result += chr(ord(char) + 3)
  5.     return result
  6.  
  7. string = input()
  8. print(caesar_cipher(string))
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement