sample_dict = { 'Physics': 82, 'Math': 65, 'history': 75}
min_value = min(sample_dict.keys())
print(min_value)
Math
sample_dict = {'a': 100, 'b': 200, 'c': 300}
some_value = 200
if some_value in sample_dict.values():
print('200 is present in a dict ')
else:
print("200 is not present in a dict")
200 is present in a dict
dict1 = {'Ten': 10, 'Twenty': 20, 'Thirty': 30}
dict2 = {'Thirty': 30, 'Fourty': 40, 'Fifty': 50}
dict1.update(dict2)
print(dict1)
{'Ten': 10, 'Twenty': 20, 'Thirty': 30, 'Fourty': 40, 'Fifty': 50}