Python provides an in-built way of storing key-value pairs. These are called Dictionaries and can be declared using dict()
or {}
.
The keys here are the left-hand side strings i.e grapes, apple, banana, orange.
They can be strings or numbers. The strings to the right are the values that are assigned to the keys.