and we don’t pass an additional value to the method, it will return none, as we have said before. on the other hand, if we want, we can pass a value that will be returned if the item is not found, which was the “the item was not found” string, which is now returned instead of none.
figure 3 – use of the get method to obtain dictionary values.
note that we can also check if a key exists in a dictionary by using the in operator, as can be seen below. nonetheless, it can’t be used to check if a value exists in the dictionary .
you can confirm in figure 4 