Assigning default values for get() function in dictionary
In the following code, we are assigning default values to the dictionary. First, we can create the dictionary and assigning the values to the names. Then, we are trying to fetch the dictionary value based on the key. If there is no such key, we will assign a default value.