simple cryptography an interesting application of strings and lists is cryptographythe science of secret messages and their applications this field studies ways of performing encryptionwhich takes messagecalled the plaintextand converts it into scrambled messagecalled the ciphertext likewisecryptography also studies corresponding ways of performing decryptionwhich takes ciphertext and turns it back into its original plaintext arguably the earliest encryption scheme is the caesar cipherwhich is named after julius caesarwho used this scheme to protect important military messages (all of caesar' messages were written in latinof coursewhich already makes them unreadable for most of us!the caesar cipher is simple way to obscure message written in language that forms words with an alphabet the caesar cipher involves replacing each letter in message with the letter that is certain number of letters after it in the alphabet soin an english messagewe might replace each with deach with eeach with fand so onif shifting by three characters we continue this approach all the way up to wwhich is replaced with thenwe let the substitution pattern wrap aroundso that we replace with ay with band with converting between strings and character lists given that strings are immutablewe cannot directly edit an instance to encrypt it insteadour goal will be to generate new string convenient technique for performing string transformations is to create an equivalent list of charactersedit the listand then reassemble (newstring based on the list the first step can be performed by sending the string as parameter to the constructor of the list class for examplethe expression listbird produces the result converselywe can use list of characters to build string by invoking the join method on an empty stringwith the list of characters as the parameter for examplethe call join( ]returns the string bird using characters as array indices if we were to number our letters like array indicesso that is is is and so onthen we can write the caesar cipher with rotation of as simple formulareplace each letter with the letter ( rmod where mod is the modulo operatorwhich returns the remainder after performing an integer division this operator is denoted with in pythonand it is exactly the operator we need to easily perform the wrap around at the end of the alphabet for mod is mod is and mod is the decryption algorithm for the caesar cipher is just the opposite--we replace each letter with the one places before itwith wrap around (that isletter is replaced by letter ( rmod