Python Dictionary Obtener valor si existe la clave
val = dict.get(key , defVal) # defVal is a default value if key does not exist
Breakable Bee
val = dict.get(key , defVal) # defVal is a default value if key does not exist
if word in data:
return data[word]
else:
return "The word doesn't exist. Please double check it."