Caesar cipher
mediumStrings20 XP
Shift every letter in s forward by k places in the alphabet, wrapping from z back to a. Keep upper/lower case, and leave anything that isn't a letter as it is. k is between 0 and 25.
Examples
- Input: s = "Hello, World!", k = 3Output: "Khoor, Zruog!"
- Input: s = "xyz", k = 3Output: "abc"
Examples use JSON: true/false/null are True/False/None in Python.