Iterating over dictionary keys and values

When you need to iterate over both dictionary keys and values using a for...in loop, you use the following:

for (key, value) in dictPizzas { 
  print("\(key): \(value)") 
} 

Your code and output should now look like this:

So, we have now looked at how to loop through a dictionary.