PPA-3
Question
Write the following functions:
is_key: accept a dictionaryDand a variablekeyas arguments. ReturnTrueif the variable key is a key of the dictionaryD, andFalseotherwise.value: accept a dictionaryDand a variablekeyas arguments. If the variablekeyis not a key of the dictionaryD, returnNone, otherwise, return the value corresponding to this key.
You do not have to accept input from the user or print the output to the console. You just have to write the definition of both the functions.
Hint
key in D evaluates to True if key is one of the keys and False otherwise.