+ 5

Explain (Code coach) Secret Message - Medium

I didn't get that

26th Apr 2020, 5:56 AM
Subash
Subash - avatar
2 Answers
+ 4
You can do it by creating a dictionary of words indexed by the reverse of those words in the alphabet. And replacing the input words with their indexed value. i.e dic ={'a':'z', 'b':'y'. ..}
26th Apr 2020, 6:29 AM
Justus
Justus - avatar
+ 4
Thank you Justus for explaining the logic, How's my implementation!!! m = input().lower() s = 'abcdefghijklm nopqrstuvwxyz' abc = list(s) cba = abc[::-1] for c in m: print(cba[abc.index(c)],end='')
26th Apr 2020, 6:48 AM
Subash
Subash - avatar