Question: python help needed Safe Decoder Function Name: safeDecoder() Parameters: characterString (str) Returns: passcodeString (str) Description: You are given an encrypted string with numbers, letters, and

Safe Decoder Function Name: safeDecoder() Parameters: characterString (str) Returns: passcodeString (str) Description: You are given an encrypted string with numbers, letters, and characters. You want to extract the indices of the numbers in the string to find the passcode to a safe. Given the character- String, write a function that returns a new string which is made up of the indices of each digit found in the original string. The order of the returned indices should match the order in which the original digits of the characterString appeared. >>> safeDecoder("ab*n3a&ca4021$") 491112 >>> safeDecoder("@p3n_Up_th3_$4f3!") 02101315 II 11 1 keyString= "0123456789" 2. def safeDecoder (characterString): 3 passwordString 4 - for charc in characterString: 5 - if charc in keyString: =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
