Dictionary={
"b":"कू",
"c":"कु",
"x":"श",
"A":"क"
def marathi(message):
dec=''
for letter in message:
for key, value in MARATHI.items():
if letter == value:
dec+=key
print(dec)
returning_key_for_value_String='शकुकू'
marathi(returning_key_for_value_String)
#output=xAA
While running the function to get back the key from the values of a dictionary,the function is providing the key of "कू" as "A" , but it should be returning "b".It looks like the function is taking only "क", due to which the expected output is not coming.