Write a function named is_key that accepts a dictionary D and a variable key as arguments. It should return True if key is a key of the dictionary D, and False otherwise.
You do not have to accept input from the user or print anything. You just have to write the definition of the function.
Example
is_key({'a': 1, 'b': 2, 'c': 3}, 'b') -> True
is_key({'a': 1, 'b': 2, 'c': 3}, 'z') -> False
Implement this function:
def is_key(D, key):
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: D, key.
Input
{'a': 1, 'b': 2, 'c': 3}
'b'
Output
True