Question: Write a function called secret in Python that takes a secret alphabet string of 26 unique characters and returns a dictionary that maps each character

Write a function called secret in Python that takes a secret alphabet string of 26 unique characters and returns a dictionary that maps each character to a letter of the alphabet, with the first character mapping to a, the second to b, and so on. You can assume there will be no spaces in the input.

For example an input of SDFGZHh!@mbM*()QWERTYUIOPA would return a dictionary that mapped:

Sa Db Fc

and so on...

def secret(secret_string):

# WRITE YOUR CODE HERE

return # the decoder dictionary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!