Write a function encode1(string, key) that does a keyword cipher using the keyword key to create the
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function encode1(string, key) that does a keyword cipher using the keyword key to create the alternate alphabet by placing the key at the beginning just before the other letters.
For example, if the key is 'earth', then the alternate alphabet is 'earthbcdfgijklmnopqsuvwxyz'. In that case, encode1('deed', 'earth') would produce 'thht'. Characters from string which are not in the alphabet are simply skipped and produce nothing in the output string.
Related Book For
Introduction To Computing And Programming In Python A Multimedia Approach
ISBN: 9780134025544
4th Edition
Authors: Mark J. Guzdial, Barbara Ericson
Posted Date: