Two ways to get key's value of a dictionary in Python

Example:

my_dictionary = {'name': 'Dmitri', 'topic': 'Python', 'fav_food': 'ice cream'}
# method 1
print(my_dictionary['name'])
# method 2
print(my_dictionary.get('fav_food'))
Output:
Dmitri
ice cream