get the message to encode instring input("please enter the unicode-encoded message"loop through each substring and build unicode message chars [for numstr in instring split()codenum eval(numstrconvert digits to number chars append(chr(codenum)accumulate new character message "join(charsprint("\nthe decoded message is:"messagemain(in this codewe collect the characters be appending them to list called chars the final message is obtained by joining these characters together using and empty string as the separator so the original characters are concatenated together without any extra spaces between this is the standard way of accumulating string in python from encoding to encryption we have looked at how computers represent strings as sort of encoding problem each character in string is represented by number that is stored in the computer as binary representation you should realize that there is nothing really secret about this code at all in factwe are simply using an industry-standard mapping of characters into numbers anyone with little knowledge of computer science would be able to crack our code with very little effort the process of encoding information for the purpose of keeping it secret or transmitting it privately is called encryption the study of encryption methods is an increasingly important sub-field of mathematics and computer science known as cryptography for exampleif you shop over the internetit is important that your personal information such as your name and credit card number be transmitted using encodings that keep it safe from potential eavesdroppers on the network our simple encoding/decoding programs use very weak form of encryption known as substitution cipher each character of the original messagecalled the plaintextis replaced by corresponding symbol (in our case numberfrom cipher alphabet the resulting code is called the ciphertext even if our cipher were not based on the well-known unicode encodingit would still be easy to discover the original message since each letter is always encoded by the same symbola codebreaker could use statistical information about the frequency of various letters and some simple trial and error testing to discover the original message such simple encryption methods may be sufficient for grade-school note passingbut they are certainly not up to the task of securing communication over global networks modern approaches to encryption start by translating message into numbersmuch like our