I have a dictionary like {"a":["b", "c", "d"], "b":["h", "i", "j"], "c":["k", "l", "m"]. I need to write a function that returns True if a requested key has requested value. Also, if "a" has "b" and "b" has "h", "i", and "j", then "a" has "b", "c", "d", "h", "i", "j". I wrote the following code and don't know what to do next:
def has_data(data, letter1, letter2):
if letter2 in data[letter1]:
return True
else:
return False
Can you help out?