I am having a directory that contains an N number of key and values and I want to iterate only 4 random and unique keys and values and then need to check the highest and lowest key and values among 4 entries then find the subtraction.
let consider:
main_dict = {"a":144,"c":55,"d":33,"e":65,"f":44,"s":344,"r":90,"t":33} random_key_and_values = 4 the new dictionary will be
new_dict = {"c":55,"f":44,"r":90,"d":33} with the new dictionary, I need the subtraction of the highest and lowest values of new_dict values.
output = 57