Python Dictionary erhalten Wert, wenn der Schlüssel existiert
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."