I want a help with dictionary problem

1 - How to write a function that takes a dictionary and a key and determines if that key is in the dictionary (i.e. the function outputs True if the key is in the dictionary, and False otherwise). This should output: True and False

2 - How to write a function that takes two dictionaries with unique keys and merge them.
This should output: {'Ten': 10, 'Twenty': 20, 'Thirty': 30, 'Fourty': 40, 'Fifty': 50}

You are viewing a single comment. View All
  1. to check if a key is in a dictionary, use the in keyword
  1. to join 2 dictionaries together, use a for loop!