We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
A hint before I show my python solution:
Look into how the .maketrans() and .translate methods in import string work. They make creating a cipher like this much easier
Also you use import string you can then use "string.ascii_lowercase" to generate a string of the lowercase letters a-z and "string.ascii_uppercase" to generate a string of the uppercase letters A-Z
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →
A hint before I show my python solution: Look into how the .maketrans() and .translate methods in import string work. They make creating a cipher like this much easier
Also you use import string you can then use "string.ascii_lowercase" to generate a string of the lowercase letters a-z and "string.ascii_uppercase" to generate a string of the uppercase letters A-Z