Determine if the key exists in dict
The given parameters are dict and key. The function will return true if the key is found in the dict. Otherwise return false.
Sample Code:
def inspectObj(d,key):
# Enter your logic here...
Examples:
Input: {ingredient:'Javascript'},'ingredient'
Output: true
Explanation: The object has a key called 'ingredient'.
Input: {tool:'Javascript'},'ingredient'
Output: false
Explanation: 'ingredient' key cannot be found in the given object.