Skip to content

Tag: dictionary

how to match the keys of a dictionary and return their values?

I have two dictionaries: Both dictionaries contains the same amount of key_value pairs. In dictionary x, the key is the translation in Bulgarian of names of languages and the values are the names of the same languages in English. in dictionary y, the keys are the name of the languages in Bulgarian and the val…

Accessing Json object values with the Help of a dictionary

I’ve a huge json file which has a lot of nested key value pairs. So I thought I should save the keys as dictionary values and use that dictionary values as keys to access the values from the json file. Say for example: so I thought to access the key morning value, instead of writing I should keep a dict…

Shift for uppercase letters

I am writing a program on shifting a word. My desired output should be a:f b:g c:h … y:d z:e A:F B:G C:H … Y:D Z:E But after running this code, my output is a:f b:g c:h … y:d z:e A:f B:g C:h … Y:d Z:e Seems isupper() function didn’t work here. Could you help with this based on my